Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Michaelo
#16173 Any GPIO can be set up for PWM under software control but that's uses additional memory and process time and in some applications these may be at a premium. Hardware PWM pins have additional registers associated with them, you can basically set things up and forget until you need to change the pulse width...
Mike
User avatar
By cherowley
#16177 Hi Michaelo,

Ah, so are we saying the nodemcu firmware is using software pwm and we are waiting to have hardware pwm on this "arduino" firmware?
User avatar
By Michaelo
#16286 I haven't used nodemcu so I can't say for definite but if it's true that the ESP8266 has one hardware PWM pin, any code offering more must be using software PWM... not that is makes much difference either way... but hardware implementation makes coding simpler...

I'm hoping to following the Arduino ESP development closely, I'm hoping for working examples to verify ADC and PWM operation... we may already have some, haven't check lately and things in the ESP world happen fast...

Mike
User avatar
By cherowley
#16770 Hiya!

I've just noticed on https://github.com/esp8266/Arduino:

" analogRead(A0) reads the value of the ADC channel connected to the TOUT pin.

analogWrite(pin, value) enables software PWM on the given pin. PWM may be used on pins 0 to 15. Call analogWrite(pin, 0) to disable PWM on the pin."

I'm sure this wasn't there before?!

Does this mean pwm is now available? Do I need to upgrade to the version on git (arduino-1.6.1-p1-windows.zip)?

Has it always been available?

My current arduino ide says its 1.6.1 and am also using visual micro.

I tried putting analogwrite into the ide and it accepted and compiled but cannot test it as at work at the moment lol