Is PWM possible during sleep?

Discussion about Z-Uno product. Visit for more details.
Post Reply
Posts: 49
Joined: 08 Apr 2018 18:02

Is PWM possible during sleep?

Post by perjar »


A question regarding output pins while sleeping.
According to this example, the Z-uno maintains the output level on digital pins even when sleeping: ... 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 :


User avatar
Posts: 5824
Joined: 26 Jan 2011 19:36

Re: Is PWM possible during sleep?

Post 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.

Post Reply