-->
Page 1 of 1

PWM - Pulse Width Modulation Note for Arduino Users

PostPosted: Wed Jun 17, 2015 6:17 pm
by FlyingHacker
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.

Re: PWM - Pulse Width Modulation Note for Arduino Users

PostPosted: Thu Jun 18, 2015 12:43 am
by tytower