ESP32 LEDC Output

The LEDC output component exposes a LEDC PWM channel of the ESP32 as an output component.

# Example configuration entry
output:
  - platform: ledc
    pin: 19
    id: gpio_19

Configuration variables:

  • pin (Required, Pin): The pin to use LEDC on. Can only be GPIO0-GPIO33.
  • id (Required, ID): The id to use for this output component.
  • frequency (Optional, float): At which frequency to run the LEDC channel’s timer. Two LEDC channels always share the same timer and therefore also the same frequency. Defaults to 1000Hz.
  • bit_depth (Optional, int): The bit depth to use for the LEDC channel. Defaults to 12.
  • channel (Optional, int): Manually set the LEDC channel to use. Two adjacent channels share the same timer. Defaults to an automatic selection.
  • All other options from Output.