Tag Archives: pwm

ESP32 PWM Example

This ESP32 PWM example explains how to use the Pulse Width Modulation (PWM) with the ESP32-WROOM32 DevKit.

ledcWrite(pinChannel, dutyCycle);
ESP32 can generate PWM on all IO pins. In the ESP32 analogWrite will not work, is different than the Arduino Uno. ESP32 uses 8, 10, 12, 15-bit resolution for PWM generation PWM value. Arduino Uses 8-Bit Resolution i.e.PWM range is 0-254.

Continue reading ESP32 PWM Example

ESP8266 PWM Example

This ESP8266 PWM example explains how to use the Pulse Width Modulation (PWM)  with the ESP8266.

analogWrite(PIN,VALUE);
ESP8266 can generate PWM on all IO pins. The ESP8266 analogWrite is different than the Arduino Uno. ESP8266 uses 10-bit resolution for PWM generation PWM value varries from 0 to 1023. Arduino Uses 8-Bit Resolution i.e.PWM range is 0-254.

Continue reading ESP8266 PWM Example