ESP8266 Software PWM Output

The ESP8266 Software PWM platform allows you to use a software PWM on the pins GPIO0-GPIO16 on your ESP8266. As this is only a software PWM and not a hardware PWM (like the ESP32 LEDC PWM) and has a key disadvantage: There can be a noticeable amount of flickering with increased WiFi activity.

If you need a stable PWM signal, it’s definitely recommended to use the successor of the ESP8266, the ESP32, and its ESP32 LEDC PWM instead.

# Example configuration entry
  - platform: esp8266_pwm
    pin: D1
    frequency: 1000 Hz
    id: pwm_output

Configuration variables:

  • pin (Required, Pin Schema): The pin to use PWM on.
  • id (Required, ID): The id to use for this output component.
  • frequency (Optional, frequency): The frequency to run the PWM with. Lower frequencies have more visual artifacts, but can represent much more colors. Defaults to 1000 Hz.
  • All other options from Output.