Detect who wake up sensor .. INT0,INT1 or timeout..
-
Hi.
I tested **Binary Sensor Sleep ** and working ... Is there any way how to check that wake up sensor from Timeout setting value or from INT1 , INT0??
I want every 1 minutes wake up and send info about sensor (battery , temperature) to serial gateway ..regards.
-
/** * Sleep (PowerDownMode) the Arduino and radio. Wake up on timer or pin change. * See: http://arduino.cc/en/Reference/attachInterrupt for details on modes and which pin * is assigned to what interrupt. On Nano/Pro Mini: 0=Pin2, 1=Pin3 * @param interrupt Interrupt that should trigger the wakeup * @param mode RISING, FALLING, CHANGE * @param ms Number of milliseconds to sleep or 0 to sleep forever * @return true if wake up was triggered by pin change and false means timer woke it up. */ bool sleep(uint8_t interrupt, uint8_t mode, unsigned long ms=0); /** * Sleep (PowerDownMode) the Arduino and radio. Wake up on timer or pin change for two separate interrupts. * See: http://arduino.cc/en/Reference/attachInterrupt for details on modes and which pin * is assigned to what interrupt. On Nano/Pro Mini: 0=Pin2, 1=Pin3 * @param interrupt1 First interrupt that should trigger the wakeup * @param mode1 Mode for first interrupt (RISING, FALLING, CHANGE) * @param interrupt2 Second interrupt that should trigger the wakeup * @param mode2 Mode for second interrupt (RISING, FALLING, CHANGE) * @param ms Number of milliseconds to sleep or 0 to sleep forever * @return Interrupt number wake up was triggered by pin change and negative if timer woke it up. */ int8_t sleep(uint8_t interrupt1, uint8_t mode1, uint8_t interrupt2, uint8_t mode2, unsigned long ms=0);
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