I want to generate a PWM signal that I can turn on and off with a button press without using interrupts. Is there a way to keep the PWM output going while running other processes?
1 Answer 1
PWM just runs once started. It's all managed by a completely separate bit of silicon inside the chip.
Once you have done analogWrite(...)
the PWM will just keep going until you tell it otherwise.
answered May 12, 2016 at 0:30
-
I was running this with Serial plotter yesterday and for some reason it kept interrupting the PWM when I was reading one of the analog channels. I finally tested on an oscilloscope and it does work. Thanks!user20985– user209852016年05月12日 17:41:01 +00:00Commented May 12, 2016 at 17:41