PWM - Pulse Width Modulation Note for Arduino Users
Posted: Wed Jun 17, 2015 6:17 pm
PWM on the ESP (tested ESP-01) seems to be 10 bit. So you can analogWrite() from 0 to 1023 to set the output duty cycle. I was specifically on pin GPIO2.
Just a community service note in case anyone is confused by this. I saw my simple fading LED was nowhere nears as bright when using analogWrite() so I hooked up the scope and saw the PWM was only at a 25% duty cycle at a value of 255.
I wish we had a master FAQ someplace. Would be nice just to add all the little gotcha to it.
Just a community service note in case anyone is confused by this. I saw my simple fading LED was nowhere nears as bright when using analogWrite() so I hooked up the scope and saw the PWM was only at a 25% duty cycle at a value of 255.
I wish we had a master FAQ someplace. Would be nice just to add all the little gotcha to it.