All parts

Push button

A button the program reads, pressed or not: to start, switch mode or react to a touch.

The test program

Test this part on its own before you build the rest: if it works alone, the rest is built on something you know works.

10 LED red, off
20 IF BUTTON("A") THEN LED red, on
30 WAIT 100
40 GOTO 10

What you should see: Hold the button down: the red light comes on; let go: it goes off.

▶ Try it in the IDE

What to buy

  • Push button

How to wire it to an ESP32-S3

  1. Signal → ESP32-S3: GPIO6Internal pull-up: pressed reads as 1
  2. GND → ESP32-S3: GNDCommon ground: this link is mandatory.

If it does not work

The program runs but nothing happens
The button is turned: the two legs in use are already joined inside the button. Seat it across the breadboard's middle gap and use two legs opposite each other on the diagonal.

Which boards it works on

  • ESP32-S3 Freenove: yes
  • Nordic nRF54LM20 DK: yes
  • Arduino UNO R4 WiFi: yes