All packs

Lights

Touch egg lamp

A night light shaped like an egg. A ring of LEDs glows under a frosted shade; tap the base to change colour.

  • Easy
  • about 40 min
  • ESP32-C3
  • 7 parts
  • 6 wires
  • 51 lines of code

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

Idea

Two wires of signal and you have a lamp with no moving switch to wear out. A short tap and a long hold do different things, which is how most one-button gadgets work.

What you learn

Driving addressable LEDs, and telling a tap from a hold by timing it.

How it works

  1. input

    Touch sensor (base)

  2. decides

    ESP32-C3

  3. output

    LED ring

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.