Interrupt

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
dom
Posts: 5
Joined: 26 Aug 2016 21:49

Interrupt

Post 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
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Interrupt

Post 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.
mdietinger@gmail.com
Posts: 39
Joined: 12 Aug 2016 12:08

Re: Interrupt

Post by mdietinger@gmail.com »

Can't be Key Scanner used as interupt?
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Interrupt

Post by PoltoS »

Yes, but pretty specific. Please see Reference.

We will publish an example soon
rskb
Posts: 1
Joined: 02 Sep 2016 02:56

Re: Interrupt

Post 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?
Post Reply