My problem with blynk

Hi! I’m french and I discover Blynk this morning.
i’ve got a arduino uno board and a ESP8266-01 board.
have you got a little tutorial on how to light a led with blynk?
I’m on arduino IDE 1.6.5 and i’ve got a lot of errors in compilation of examples:
Arduino : 1.6.5 (Windows 7), Carte : “Generic ESP8266 Module, 80 MHz, 115200, 512K (64K SPIFFS)”

Les options de compilation ont été modifiées, tout sera recompilé

In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/BlynkSimpleEsp8266.h:15:0,
from ESP8266_Standalone.ino:26:
C:\Program Files\Arduino\libraries\blynk-library-0.2.1/BlynkApiArduino.h:44:6: warning: always_inline function might not be inlinable [-Wattributes]
void BlynkApi::processCmd(const void* buff, size_t len)
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/BlynkSimpleEsp8266.h:16:0,
from ESP8266_Standalone.ino:26:
C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkProtocol.h:159:6: warning: always_inline function might not be inlinable [-Wattributes]
void BlynkProtocol::processInput(void)
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:17:0,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/ets_sys.h:104:5: error: previous declaration of ‘int atoi(const char*)’ with ‘C++’ linkage
int atoi(const char *nptr);
^
In file included from c:\users\antoine\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\xtensa-lx106-elf\include\stdint.h:12:0,
from c:\users\antoine\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\lib\gcc\xtensa-lx106-elf\4.8.2\include\stdint.h:9,
from C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/c_types.h:8,
from C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/ets_sys.h:11,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:17,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
c:\users\antoine\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\xtensa-lx106-elf\include\stdlib.h:70:5: error: conflicts with new declaration with ‘C’ linkage
int _EXFUN(atoi,(const char *__nptr));
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:17:0,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/ets_sys.h:119:6: error: previous declaration of ‘void ets_intr_lock()’ with ‘C++’ linkage
void ets_intr_lock();
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:26:0,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/Arduino.h:122:20: error: conflicts with new declaration with ‘C’ linkage
void ets_intr_lock();
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:17:0,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697/tools/sdk/include/ets_sys.h:120:6: error: previous declaration of ‘void ets_intr_unlock()’ with ‘C++’ linkage
void ets_intr_unlock();
^
In file included from C:\Program Files\Arduino\libraries\blynk-library-0.2.1/Blynk/BlynkDebug.h:26:0,
from C:\Program Files\Arduino\libraries\blynk-library-0.2.1\utility\BlynkDebug.cpp:10:
C:\Users\antoine\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.4-673-g8cd3697\cores\esp8266/Arduino.h:123:22: error: conflicts with new declaration with ‘C’ linkage
void ets_intr_unlock();
^
Erreur lors de la compilation

please help me :blush:

@antoine

Hi, please try latest library version. See https://github.com/blynkkk/blynk-library/releases/tag/v0.2.2-beta

Thanks! it works with the standalone ESP8266 example but now, how can i put this code in my ESP8266? I just have a arduino uno and a arduino nano board but i don’t have usb ftdi programmer.

Any USB-Serial TTL converter would be OK.

Can I use my arduino uno as serial to ttl programmer?

when I compile the esp8266 standalone example, i got this message and the transmission failed.
why? I use my arduino as serial to ttl converter–> gnd to reset, tx to rx, rx to tx, vcc to 3.3V and gnd to gnd.

warning: espcomm_sync failed
error: espcomm_open failed

thanks

You could use SoftwareSerial on your Arduino to transfer data,
but maybe the 115200 baud rate is too high for SoftwareSerial to handle.
You could use a board with additional Hardware Serial, but Uno and Nano don’t have one.

Well it’s definitely worth buying a converter (it’s very cheap and you will need it all of the time).

@antoine I had a couple of new error messages after getting the newest library @vshymanskyy posted earlier here. So I went ahead and installed from scratch (latest Arduino IDE 1.65 RC2 as well as blynk library)… Didn’t work. So I removed the complete blynk library folder (where I just pasted+overwrote stuff from earlier on) and put the new library in once more. Obviously there where some remains which were preventing the IDE from compiling to the end, now it’s working fine again (apart from the already known warning: always_inline function might not be inlineable [-Wattributes]-warning.

@Minc, please note that using ESP8266 as an Arduino modem requires a modified library (the link is specified in the relevant sketch).

Cheers.

Thanks for the posts. I downloaded the Blynk and esp8266 libraries, then modified the ESP8266_Standalone code to connect to my router, and set my auth code from my IOS app.
Downloaded to my 8266-01 module through an FTDI adapter module, and the app button works to control the physical LED!!
OK, now I wanted to use a virtual LED in my IOS blynk app to reflect the current status of my physical LED, so I added a few lines of code suggested by other users - it compiles with only the ‘inlinable’ warnings others have posted about…but when I attempt to download to my 8266 (with GPIO0 low after a power cycle), I consistently get these messages from Arduino IDE (v1.6.4 with added libraries as mentioned):
warning: espcomm_sync failed
error: espcomm_open failed
My guess is that my code is not at fault, or I would have gotten compiler errors. I suspect it’s my 8266 module or wiring between USB, FTDI and 8266 module?
One other symptom is that sometimes (but not always) after I power cycle my 8266, the LED on GPIO2 is constantly ON (other times it’s OFF), and other times the blue LED on my 8266 after a power cycle is constantly ON (other times it blinks a couple times then goes OFF). Also, my IOS Blynk app tells me my 8266 is offline, when I click on the “go” triangle button…
Anyone else have this issue?

Please check your wiring and the Port/Speed you selected (and how you normally upload sketches to ESP)…
It is not related to Blynk.

Also check, that you have sufficient power (3.3 V). Some USB-Ports have not enough power to maintain both the FTDI and the ESP-01. As for the wiring…
RX<->TX
TX<->RX
Power FTDI <-> Power ESP Board <-> Chip enabled (I soldered ESP Power to CH_EN for the time being…).
Ground FTDI <-> Ground ESP <-> GPIO 0

This works for me… When using the ESP-12 GPIO 15 needs to be low as well for me…

Thanks guys. I no longer have this issue with syncing. However, I still have questions about virtual pins in Blynk. Or, stated in another way, how do I set an LED indicator in my Blynk app using the actual status of a physical device (e.g., LED)? I want actual status as opposed to the commanded status, which is easy.
Thanks,
James