Comments (11)
Hi,
Thanks for your message. The idea is to only have scheduler.execute()
in your loop()
method like this:
void loop() {
scheduler.execute();
}
Please remove all other code in loop()
. Does it still reset the esp8266?
You can move the code you have in loop()
to callback methods like your initializeModem()
and schedule it on regular basis.
from deepsleepscheduler.
It does not work with simple code. I am using nodemcu dev board featuring esp12e. I have checked that delay of up to 8 seconds work but not 9+ seconds.
`#include <DeepSleepScheduler.h>
void setup() {
Serial.begin(115200);
scheduler.scheduleDelayed(initializeModem, 9000);
}
void loop() {
scheduler.execute();
}
void initializeModem(){
Serial.println();
Serial.println("Initializing modem...");
}`
`ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vac02aff5
~ld
`
from deepsleepscheduler.
Hi @kulwinderjit ,
Thanks for testing it out. Unfortunately, I don't have an ESP8266 here at the moment. Could you check if the following workaround solves the issue?
#include "DeepSleepScheduler.h"
void periodicExecution() {
scheduler.scheduleDelayed(periodicExecution, 5000);
}
void setup() {
scheduler.schedule(periodicExecution);
}
void loop() {
scheduler.execute();
}
from deepsleepscheduler.
Updated library to 3.2. It does not work
ts Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
from deepsleepscheduler.
Hi @kulwinderjit
Could you try my code above? Does it work with it?
Thanks,
Pete
from deepsleepscheduler.
yes i have tried your code it worked and then i changed 5000 to 9000 and it started resetting again. Then i saw there is library update 3.2 after updating it stopped working with 5000 and even 1000.
from deepsleepscheduler.
I see, thanks for testing it. The version 3.2 is not yet released. Please continue to use 3.1 for now and I will look into it when I get an ESP8266 again.
from deepsleepscheduler.
I see. I got 3.2 update on platformio but not in arduino ide.
from deepsleepscheduler.
Interesting.. So platformio seems not to honour the tag.
I hope you're not blocked any more with 3.1 and the workaround above.
from deepsleepscheduler.
yes i have tried your code it worked and then i changed 5000 to 9000 and it started resetting again
It does not work with interval 9 sec or more. I have requirement of around 60 second timeout. Your code worked because you put 5000 ms interval which works.
from deepsleepscheduler.
Hi @kulwinderjit,
I got an ESP8266 and updated DeepSleepScheduler on master. Does it work well for you now?
from deepsleepscheduler.
Related Issues (14)
- Does not compile for DigiSpark Pro (AtTiny167) HOT 6
- Documentation on used sleep mode HOT 5
- NTP Daily task HOT 3
- Interrupt doesn't work with rotary encoder HOT 7
- Debounce Example HOT 1
- MIN_WAIT_TIME_FOR_SLEEP HOT 3
- Compiler warnings HOT 5
- swap SLEEP_MODE at run time? HOT 3
- Error printing to Serial Monitor HOT 3
- External Interrupt HOT 7
- add scheduleOnce() HOT 7
- Does not compile on DOIT ESP32 DEVKIT V1 HOT 1
- multiple definition of '****' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepsleepscheduler.