tytower wrote:Just to confirm I set up blink on the ESP-12 and 1023 works for me too Thanks FlyingHacker
No worries. Just out of curiosity, which pin(s) were you using for output? Also, which function call? analogWrite()?
Thanks.
Straight out of examples -basic-fade
analogWrite(led, brightness);
eriksl wrote:Your quoting the wikipedia that is based on an older SDK.
I repeat, the ESP8266 does NOT have any hardware for PWM. The old SDK had a more limited software implementation than the current one. Nothing more nothing less.
It's not really that difficult to implement a software PWM, I've done it myself. Just program the interrupt of a fast enough timer to go when the next PWM GPIO should flip and when the interrupt fires, flip the GPIO and calculate the time to the next PWM GPIO in clock ticks, and program the timer interrupt compare register for that. That's why multiple PWM's can't have duty cycles that are very close together, in the time the compare register is programmed, the timer already reached that point.
The thread is here viewtopic.php?f=11&t=3212&start=30