sleep() or smartsleep() in 2.0b MySensors
-
Hello,
Has smartsleep been implemented in 2.0 or 2.0.1b?
Did anyone use sleep function as below:int8_t sleep(int interrupt, int mode, unsigned long ms=0); int8_t smartSleep(int interrupt, int mode, unsigned long ms=0);I have a number of i2c sensors and I am getting data every 5 minutes or so. Also I am trying to combine lightning sensor sketch into it (IRQ is connected to D2 to interrupt). So how do I use the function to (1) sleep until D2 is interrupted and (2) sleep for 5 mins?
In the setup for the lightning sensor I have :
attachInterrupt(digitalPinToInterrupt(IRQ_pin), alert, RISING);I suppose I need a sleep function at the end of loop like this:
sleep(IRQ_PIN, CHANGE, 5*60000);Can anyone confirm this is how this function is now used please?
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