Page 1 of 1

Interrupt

Posted: 29 Aug 2016 13:41
by dom
Hi,

There is one Interrupt available, does it work like arduino ?
If no can you add an example.
Basic example : a relay controlled by z-wave and by a switch (interrupt when switch is pressed,
in order to not scan the switch in the loop).

Thanks

Re: Interrupt

Posted: 29 Aug 2016 18:44
by PoltoS
Currently Z-Uno do not have interupt handlers and you need to poll. Interrupts are used to wake up Z-Uno from deep sleep.

Re: Interrupt

Posted: 31 Aug 2016 11:03
by mdietinger@gmail.com
Can't be Key Scanner used as interupt?

Re: Interrupt

Posted: 31 Aug 2016 12:21
by PoltoS
Yes, but pretty specific. Please see Reference.

We will publish an example soon

Re: Interrupt

Posted: 02 Sep 2016 03:07
by rskb
Do you mean that I cannot write my own interrupt handler, or that I cannot cause the device to wake up from zunoSendDeviceToSleep() from an external component at all?

Did you know that https://z-uno.z-wave.me/Reference/zunoS ... ceToSleep/ is not available (404)?

The reference for zunoSetupKeyScannerWU says "This call instructs Z-Uno to wake up not on INT1 going LOW, but on Key Scanner button press detection." so does this mean that zunoSendDeviceToSleep() will cause the device to wake up and continue loop() if I can cause INT1 to go low? Then I could arrange this and then poll just once to see what happened.

If I have to continuously poll, won't that cause extremely poor battery life? If for example I sleep in loop() for 50ms so that I get an immediate response time on the button press, then use FLiRS, and poll a pin each time, then what would Z-Uno's power consumption be?