All packs

Lights

Touch hexagon lamp

Three hexagons of light on the wall. Tap a hexagon to step it through its colours; touch all three to switch everything off.

  • Hard
  • about 80 min
  • ESP32-S3
  • 7 parts
  • 12 wires
  • 68 lines of code

ESP32 packs are built on real parts: the simulator runs Arduino Uno circuits only.

Idea

One strip of LEDs is treated as three groups of six. The sketch never lights “a hexagon”: it lights LEDs 0 to 5, 6 to 11 and 12 to 17, and the case does the rest.

Before you start

Eighteen LEDs at full white can draw more than a computer's USB port gives. The sketch limits brightness; if you raise it, power the lamp from a 5 V 2 A charger.

What you learn

Splitting one LED strip into zones, and handling several inputs at once.

How it works

  1. input

    Touch pad 1

    Touch pad 2

    Touch pad 3

  2. decides

    ESP32-S3

  3. output

    LED strip

Powered with 5 V through the board's USB-C port.

A reference design. The sketch is compiled with the real ESP32 toolchain, and its pins are checked against the wiring table automatically. It has not yet been built and tested on real parts by us, so wire it on the bench and run the checks before you build it into a case. Real modules vary: follow the labels printed on yours, not their position in the picture.