Esphome example blink

From Notebook
Jump to navigation Jump to search

You would think that blinking an LED is a no-brainer, but in ESPHome there are many methods that you can use to blink an LED on a GPIO port.
The most complex is to use a PWM output, but I just wanted to blink an LED.

# Blink the green LED on D5 (GPIO14)
output:
  - platform: gpio
    pin:
      number: D5
      mode: output
    id: greenLED

interval:
  - interval: 500ms
    then:
      - output.turn_on: greenLED
      - delay: 250ms
      - output.turn_off: greenLED

Navigation[edit]

Return to the ESPHome page