Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Orcanbull
#53911
picstart wrote:I tested the above code and it will stop working after several dozen cycles.
It goes to sleep but won't wake up.
This is an obvious omitted requirement that needs adding for the compilation
Code: Select allextern "C"
{
#include "user_interface.h"
}


Hi picstart,

Indeed you are right,
That part of code should be included , I took the functions from a larger set of code hence i forgot to put it there in the post thanks for the reminder !
User avatar
By Orcanbull
#53912
frjariello wrote:Hi,
thanks for sharing your code.
Even your example uses the time for wake up from sleep mode, but you know any method for wake him from a digital input?
I need to monitor a digital input, and then send only when status changes

Thanks

bye bye


Hi,

I suppose you can simply add a interrupt to your pin, when the pin is pressed in the interrupt you put the wake up function. The ESP is not really in sleep , so it will respond to your interrupt.
I actually do a similar thing, i let the ESP sleep for 100 mil then check the pin, but interrupt will work aswell
User avatar
By Orcanbull
#53914
danbicks wrote:@Orcanbull, please expand on your capacitor bank, how many uF?

Sounds really cool thanks for posting this snip.

Dans


HI dans,

Good to hear you like it.

Well the bank itself are 6 X 100F 2.7V caps in series which makes it a 16.(2/3) F 16.2 V cappacitor Bank.
I use a Voltage Regulator to give the the 3v3 volt. In that specific test i used this board ( https://www.hobbyelectronica.nl/product ... step-down/) for regulating my voltage. However i currently use an even more effiecient one, i will look up the specs for you later. One thing i can say is that the efficiency of the Voltage regulator is really important.
User avatar
By picstart
#53937 I found if I add this code to the setup then the sketch above will run more than just a few dozen cycles before failing.
[quote]
wifi_station_disconnect();
wifi_set_opmode_current(NULL_MODE);
[/quote]
I suspect the esp8266 has recorded its connection status as it sleeps and it wakes up the wifi hardware has necessary things to do that result in failure after a few dozen cycles.