Esphome example blink: Difference between revisions
Jump to navigation
Jump to search
(Created page with " <nowiki># Blink the green LED on D1 (GPIO4) output: - platform: gpio pin: number: D3 mode: output id: greenLED interval: - interval: 500ms then: - output.turn_on: greenLED - delay: 250ms - output.turn_off: greenLED</nowiki>") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
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.<br> | |||
The most complex is to use a PWM output, but I just wanted to blink an LED.<br> | |||
<nowiki># Blink the green LED on | <nowiki># Blink the green LED on D5 (GPIO14) | ||
output: | output: | ||
- platform: gpio | - platform: gpio | ||
pin: | pin: | ||
number: | number: D5 | ||
mode: output | mode: output | ||
id: greenLED | id: greenLED | ||
Line 14: | 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 08: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