Esphome example blink: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
- delay: 250ms | - delay: 250ms | ||
- output.turn_off: greenLED</nowiki> | - output.turn_off: greenLED</nowiki> | ||
=Navigation= | |||
[[ESPHome|Return to the ESPHome page]]<br> | |||
Latest revision as of 09:55, 27 August 2023
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