Page 1 of 1

Is PWM possible during sleep?

Posted: 20 Sep 2019 10:27
by perjar
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

Re: Is PWM possible during sleep?

Posted: 21 Sep 2019 01:59
by PoltoS
Correct, you need to store variables in NZRAM if you want them to survive the sleep.

PWM will not work in sleep mode.