Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noob needs help with sleep function #2

Open
Druidus opened this issue Mar 26, 2017 · 4 comments
Open

Noob needs help with sleep function #2

Druidus opened this issue Mar 26, 2017 · 4 comments

Comments

@Druidus
Copy link

Druidus commented Mar 26, 2017

Could you please provide a short example how the sleep function is called. Thanks in advance!

@ricki-z
Copy link
Owner

ricki-z commented Mar 26, 2017

for sleep you can use the sleep() and wakeup() functions.
SDS011 mySDS(pinRX,pinTX);
mySDS.begin();
mySDS.sleep();
mySDS.wakeup();

Any command sent to the SDS011 will wake him up. So if you try to read data from a "sleeping" SDS011 that will wake up the SDS.

@Druidus
Copy link
Author

Druidus commented Mar 27, 2017

Thx for your answer! Helped me to track down the problem.
// Sleep my_SDS.sleep(); ESP.deepSleep(sleepTimeS * 100000);

the deep.sleep() command for the ESP always wakes up the SDS011 - dont know who is to blame for that ;-)
Thx again

@cyrinux
Copy link

cyrinux commented Apr 11, 2017

@Druidus I can confirme I have the same problem on a arduino mega with Sleepy::loseSomeTime(sleepTime);

@ubergesundheit
Copy link
Contributor

@Druidus The issue with the deepSleep of the ESP8266 could be related to the fact, that the ESP pulls all pins to high just before sleeping. Since the SDS011 is connected through a SoftSerial, it could be possible, the SDS011 interprets this signal and wakes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants