These are chat archives for esp8266/Arduino

31st
Jan 2016
Tony Kambourakis
@tonykambo
Jan 31 2016 00:49
This message was deleted
probonopd
@probonopd
Jan 31 2016 11:09
hi. is there an #ifdef that would let me cancel compilation if the esp core is too old?
tzapu
@tzapu
Jan 31 2016 11:12
or throw a warning at least that it won t compile, with some more meaningful information on what the user needs to do?
Ivan Grokhotkov
@igrr
Jan 31 2016 11:15
there isn't, but that's a good idea to add
unfortunately if we add it now (i.e. ARDUINO_ESP8266_2_1_0), you won't be able to distinguish between older versions (i.e. 2.0.0)
there are some tricks which you can use though
for instance, you may find some member function (in any of the core classes) which was added around the same time as the function you need
and then use SFINAE to trigger code depending on the presence of given member function
see e.g. this for example: http://stackoverflow.com/a/87846/5659071
and then use static_assert to show meaningful error message
probonopd
@probonopd
Jan 31 2016 11:26
@igrr thanks. I notice it is getting harder and harder to find out the correct combination of versions between Arduino IDE, esp8266 core, and libraries. So it would be great if there would be an official way
so that library authors could do "if esp8266/Arduino < 2.1.0 ; then exit "too old"
Tony Kambourakis
@tonykambo
Jan 31 2016 12:49
@ivankravets was able to get a single project working fine. However, when creating a second project it gives me build errors in the original project that worked and the new project.
@ivankravets even with 0.3.3
For example:
scons: *** [.pioenvs/nodemcu/firmware.elf] /Users/tonykambo/Documents/Development/Embedded/PlatformIO/IncubatorController/.pioenvs/nodemcu/firmware.elf: No such file or directory
========================= [ ERROR ] Took 0.90 seconds =========================
"xtensa-lx106-elf-size" -B -d .pioenvs/nodemcu/firmware.elf
scons: `.pioenvs/nodemcu/firmware.bin' is up to date.
text       data        bss        dec        hex    filename
219954       2593      31992     254539      3e24b    .pioenvs/nodemcu/firmware.elf
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/IncubatorController/src/tmp_ino_to.cpp'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/IncubatorController/src/tmp_ino_to.cpp'
========================= [SUCCESS] Took 1.22 seconds =========================
1.1 sBuild finished.
Build error on the original project that worked but now is broken since creating another project:
I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant .pioenvs/nodemcu/FrameworkArduino/core_esp8266_postmortem.c
xtensa-lx106-elf-gcc -o .pioenvs/nodemcu/FrameworkArduino/core_esp8266_si2c.o -c -std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=0000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_ESP12 -DARDUINO=200 -I/Users/tonykambo/.platformio/packages/framework-arduinoespressif/tools/sdk/include -I.pioenvs/nodemcu/FrameworkArduino -I.pioenvs/nodemcu/FrameworkArduinoVariant .pioenvs/nodemcu/FrameworkArduino/core_esp8266_si2c.c
xtensa-lx106-elf-gcc: error: .pioenvs/nodemcu/FrameworkArduino/core_esp8266_si2c.c: No such file or directory
scons: *** [.pioenvs/nodemcu/FrameworkArduino/core_esp8266_si2c.o] Error 1
xtensa-lx106-elf-gcc -o .pioenvs/nodemcu/FrameworkArduino/core_esp8266_timer.o -c -std=gnu99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -ffunction-sections -fdata-sections -MMD -DF_CPU=0000000L -D__ets__ -
and
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/SmartLetterbox/src/tmp_ino_to.cpp'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/SmartLetterbox/src/tmp_ino_to.cpp'
========================= [SUCCESS] Took 2.95 seconds =========================
andig
@andig
Jan 31 2016 13:54
I'd like to know if I can save data when doing spiffs update via ota. E.g. Would it be possible to write data feom RAM ro the freshly updates spiffs during the ota.onend event? Would it need any re-starting spiffs? Looking for a way here to update file while keeping config data intact.
Ivan Kravets
@ivankravets
Jan 31 2016 14:43
@tonykambo please check the permissions of /Users/tonykambo/Documents/Development/Embedded/PlatformIO/SmartLetterbox/src/
lopz
@lopz
Jan 31 2016 15:55
hi :)
aug2uag
@aug2uag
Jan 31 2016 17:05
@andig SPIFFS uses convention w and w+ http://stackoverflow.com/a/23566951/1546710
I deleted my Arduino folder to do a fresh install
aug2uag
@aug2uag
Jan 31 2016 17:11
performed https://code.google.com/archive/p/arduino/wikis/BuildingArduino.wiki now fatal error: user_interface.h: No such file or directory [exec] #include "user_interface.h" on compile sketch
andig
@andig
Jan 31 2016 17:30
@aug2uag not sure how that answers the question. I'd basically like to know if its save writing to SPIFFS during OTA.onEnd()after an OTA SPIFFS update.
andig
@andig
Jan 31 2016 17:42
@igrr could you take a short look here: https://github.com/esp8266/Arduino/blob/39f36d45098429c881b75d9adece7f3f4e8853f9/cores/esp8266/MD5Builder.cpp#L74
Is this safe to do on a 32 bytes buffer? If I understand sprintf it appends the final \0 so we would need 33 bytes?
andig
@andig
Jan 31 2016 17:49
See esp8266/Arduino#1544, if stupid please cancel.
Chris Elsworth
@celsworth
Jan 31 2016 18:42
sdk 1.5.2 released I see
James Smith
@loopj
Jan 31 2016 19:31
good morning everyone
just found out about esp8266 yesterday
after getting frustrated with my particle photon
ystrem
@ystrem
Jan 31 2016 19:31
heh morning :D
hello
James Smith
@loopj
Jan 31 2016 19:31
(I'm in west coast america)
<3 timezones
ystrem
@ystrem
Jan 31 2016 19:32
I know :), just joking
Photon is not good ?
James Smith
@loopj
Jan 31 2016 19:33
its a really nice device, but there is no "real" library support (dependency management, etc)
and no platformio support
Aditya Tannu
@AdySan
Jan 31 2016 19:33
Yes for platformIO
James Smith
@loopj
Jan 31 2016 19:35
just ordered a ESP-12E dev board
d-anders
@d-anders
Jan 31 2016 19:37
get a nodemcu as well
very convenient for quick tests etc
James Smith
@loopj
Jan 31 2016 19:37
actually I think that's what I got
d-anders
@d-anders
Jan 31 2016 19:38
yeah, those are nice!
James Smith
@loopj
Jan 31 2016 19:40
i think my library should work almost out of the box with this device + platformio
Ivan Grokhotkov
@igrr
Jan 31 2016 19:41
@andig yep you're right, merged, thanks :)
andig
@andig
Jan 31 2016 20:36
You're welcome. Saw this crashing with async server, obvious with the exception encoder of @me-no-dev
aug2uag
@aug2uag
Jan 31 2016 21:20
I made a mistake earlier today where I deleted my Arduino folder. Following the install and ant build, and adding ESP8266 per instructions there including runniny py script, compile errors fatal error: user_interface.h: No such file or directory [exec] #include “user_interface.h"
aug2uag
@aug2uag
Jan 31 2016 21:31
stupid mistake, didn't choose correct board, then permissions err remedied.. thanks for hearing me out
brutzler
@brutzler
Jan 31 2016 21:39
Hi @ /all
got my nextion display today. Its a "standalone HMI" with a serial interface.
Just guessing how to connect to my nodemcu. Think, that the normal Rx and Tx are connectect to the FTDI-chip for debug serial to computer via USB. Is there a second or third UART, like at Arduino MEGA?
Helio Machado
@0x2b3bfa0
Jan 31 2016 21:41
@brutzler: You can SoftwareSerial on any pin pair. I'm wrong?
@brutzler: Maybe this will clarify you something? esp8266/Arduino#482
Tony Kambourakis
@tonykambo
Jan 31 2016 21:53
@ivankravets /src for both projects have drwxr-xr-x with Read/Write to my user id
brutzler
@brutzler
Jan 31 2016 21:56
ok. here is some info: https://github.com/esp8266/Arduino/blob/master/doc/reference.md#serial
I understood, that I can swap the UART0 from the normal pins (1 and 3) to 13 and 15. But how to make in that case a serial debug and serial communication in the software?
To use the UART1 is no help for my display, because I need a bidirectional communication, and for debug it won't work without hardware mod on a NodeMCU.
"Software serial" will have limits on baudrate as on the arduinos?
Ivan Kravets
@ivankravets
Jan 31 2016 21:56
@tonykambo please open an issue here https://github.com/platformio/platformio-atom-ide
Tony Kambourakis
@tonykambo
Jan 31 2016 22:02
will do
@ivankravets I see that even if a do a Clean it will show an error
Removed .pioenvs/nodemcu/libPubSubClient_ID89.a
Removed .pioenvs/nodemcu/libAdafruit_DHT_ID19.a
Removed .pioenvs/nodemcu/firmware.elf
Removed .pioenvs/nodemcu/firmware.bin
========================= [SUCCESS] Took 0.52 seconds =========================
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/SmartLetterbox/src/tmp_ino_to.cpp'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/Users/tonykambo/.atom/packages/platformio-ide/penv/lib/python2.7/site-packages/platformio/builder/tools/piomisc.py", line 118, in delete_tmpcpp_file
remove(file_)
OSError: [Errno 2] No such file or directory: '/Users/tonykambo/Documents/Development/Embedded/PlatformIO/SmartLetterbox/src/tmp_ino_to.cpp'
========================= [SUCCESS] Took 0.53 seconds =========================
Ivan Kravets
@ivankravets
Jan 31 2016 22:07
@tonykambo 1 sec, I'll prepare new build for you. Which version of PlatformIO IDE do you use? Menu: PlatformIO > Help > About?
Tony Kambourakis
@tonykambo
Jan 31 2016 22:10
@ivankravets issue #30 created for this. I’m using IDE 0.3.3 | CLI 2.8.2
@ivankravets i’ll continue chatting to you about this in platformio room - just found it!
Ivan Kravets
@ivankravets
Jan 31 2016 22:21
@tonykambo I've fixed. Thanks! platformio/platformio-atom-ide#30
Tony Kambourakis
@tonykambo
Jan 31 2016 22:42
@ivankravets still has build errors. Updated issue.