Post topics, source code that relate to the Arduino Platform

User avatar
By FlyingHacker
#20753 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.