Hi
I am experimenting on using Blynk with Sparkfun esp8266 thing Dev and Feather Huzzah esp8266 Wifi. All is working as it should and I am impressed by Blynk.
The only problem I found is with the Led widget. In my code I declared the
WidgetLED led1(V1)
and the function
void checkPin()
{
if (digitalRead(13)) {
led1.on();
Serial.println(“Led on”);
} else {
led1.off();
Serial.println(“Led off”);
}
}
As soon as the script try to execute the checkpin() the 2 boards start resetting continuously.
If I remove the led1.on() and led1.off(), then the program execute as it should.
I tried different pin whit the same results. Nothing is connected to the board and I only access it through the a widget button connected to the GP13 pin
For future: All the code sections should be formatted. Please edit all your posts containing code.
Wrap the code by adding 3 Backtick: ``` symbols:
Example:
``` cpp <--put 3 backticks BEFORE your code starts (cpp means C++ language)
//Put your code here
//..................
//..................
``` <--insert 3 backticks AFTER your code
I have a Sparkfun Thing that I run a basic project on. If you are trying to use the builtin LED on that board, I am pretty sure it is GP5, not 13. Try that and see if it works
Good Luck
Hi all, I think ESP cannot send data to WiFi while it’s in the interrupt context.
You should defer the action to the main loop somehow, raise a flag variable for example…