Skip to content

Zephyr PWM Output

The Zephyr PWM platform allows you to use a hardware PWM on chips running the Zephyr RTOS like nRF52.

# Example configuration entry
output:
- platform: zephyr_pwm
pin: P0.02
frequency: 1kHz
id: pwm_output
# Example usage in a light
light:
- platform: monochromatic
output: pwm_output
name: "Kitchen Light"
  • 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 1kHz.

  • All other options from Output.