LOGBOOK

HELP

Quiz Entry - updated: 2026.10.20

A FreeRTOS app on an ESP32 must switch an LED when a button is pressed. What does this add compared with simply blinking an LED?

Blinking only drives an output on a timer. Button-to-LED also has to read an input, so the program has to react to the outside world: configure a pin as input, give it a defined idle level, and decide when to check it.

The blink program only ever writes: set the pin high, wait, set it low, wait. Nothing outside the chip affects it. Button-to-LED closes a loop through the physical world:

Blink Button-to-LED
Pins One output One output (LED on IO5) and one input (button on IO4)
What decides the LED state A timer A person pressing the button
New problems None The input needs a defined level when the button is open (pull-up), the contacts bounce, and the program must notice presses (polling or interrupt)

The hardware is the same kit as before: the ESP32 dev board, a breadboard, jumper wires, the LED with its 330 Ω series resistor, and now a push button. The build steps are unchanged too: wire the circuit, edit the C source on the laptop, idf.py build, idf.py flash monitor, and the task runs on the board. What is new is all in reading the button reliably, which the cards that follow take one at a time.

Go deeper:

From Quiz: SIOT / GPIO Input and I2C Sensor Wiring on the ESP32 | Updated: Oct 20, 2026