Sleep forever without INTERRUPT, how?
-
According to Sleeping-section here
http://www.mysensors.org/download/sensor_api_15#the-full-apiI need to use this
bool sleep(int interrupt, int mode, unsigned long ms=0);if I want to sleep forever
I tried with out interrupt and mode but if I put 0 as ms it sleeps for 0 ms.I can of course use 10000000000000 ms but if there is a function for sleep forever it is much better to use that.
Why cant I use 0 like this
void sleep(unsigned long ms);Anyone know?
-
According to Sleeping-section here
http://www.mysensors.org/download/sensor_api_15#the-full-apiI need to use this
bool sleep(int interrupt, int mode, unsigned long ms=0);if I want to sleep forever
I tried with out interrupt and mode but if I put 0 as ms it sleeps for 0 ms.I can of course use 10000000000000 ms but if there is a function for sleep forever it is much better to use that.
Why cant I use 0 like this
void sleep(unsigned long ms);Anyone know?
-
I am building a sketch like this and as soon as i touch the pin it restarts
http://forum.mysensors.org/topic/3355/count-car-starts
And dont want to power off after each start. I SLEEP_TIME to 24 hours -
I am building a sketch like this and as soon as i touch the pin it restarts
http://forum.mysensors.org/topic/3355/count-car-starts
And dont want to power off after each start. I SLEEP_TIME to 24 hours@flopp using while(1) {} will also implement a wait-for-ever but will NOT cause the processor to save battery power but if you do NOT run on batteries this does not matter. The only way to get out this loop is a reset.
while ( 1 ) { } -
@flopp using while(1) {} will also implement a wait-for-ever but will NOT cause the processor to save battery power but if you do NOT run on batteries this does not matter. The only way to get out this loop is a reset.
while ( 1 ) { }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login