Is PWM possible during sleep?

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
perjar
Posts: 49
Joined: 08 Apr 2018 18:02

Is PWM possible during sleep?

Post by perjar » 20 Sep 2019 10:27

Hi,

A question regarding output pins while sleeping.
According to this example, the Z-uno maintains the output level on digital pins even when sleeping: https://z-uno.z-wave.me/Reference/zunoS ... ceToSleep/

Does it work also for analog pins? Let's say I want to use the z-uno as a dimmer and want to output a PWM signal using analogWrite, would that work across sleep cycles?

What I don't quite understand in the example above is how the getter() function will be able to return a value. Are not all variables cleared during sleep? Don't I need to store the value in NZRAM in the getter() function to maintain it across sleeps?
Something like in this example : https://z-uno.z-wave.me/Reference/NZRAM/

Cheers,
Per

User avatar
PoltoS
Posts: 4991
Joined: 26 Jan 2011 19:36

Re: Is PWM possible during sleep?

Post by PoltoS » 21 Sep 2019 01:59

Correct, you need to store variables in NZRAM if you want them to survive the sleep.

PWM will not work in sleep mode.

Post Reply