How to sleep the Arduino but still have it respond to the Vera?
-
Hi again!
I've tried different approaches now with the gw.sleep(); func without success, using CHANGE, RISING or FALLING. No reaction either from tag or the Vera.
// Wait for card/tag to leave reader while(nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], ¤tKeyLength)); // gw.sleep(2000); } gw.sleep(0, CHANGE, 1, CHANGE, 0); // int8_t sleep(uint8_t interrupt1, uint8_t mode1, uint8_t interrupt2, uint8_t mode2, unsigned long ms=0); }I've also tried adding this to setup();
interrupts();as well as this:
attachInterrupt(0, loop, CHANGE); attachInterrupt(1, loop, CHANGE);Nothing happens. It just continues to sleep...
-
I'm back to choosing between no sleep, and the sleep(); function posted above. I can't get gw.sleep(); to work with either one or two interrupts, with or without declaring interrupts(); and/or attachInterrupt();.
I'm ready to try more stuff if anyone got any ideas, but with my own limited understanding of both hardware in general and arduino in particular it feels like I'm running on fumes here. :o
Thanks everyone for your contribution, and @hek - you've done a great job with MySensors! :clap: