All packs

Lights

Dimmer lamp

Turn a dial and an LED goes from off to full brightness, like the dimmer on a bedside lamp.

  • Easy
  • about 20 min
  • Arduino Uno
  • No soldering
  • 7 parts
  • 6 wires
  • 14 lines of code
Try it in the simulator

Opens this circuit, already wired, with the sketch loaded. Free, nothing to install.

Idea

The Arduino reads how far the dial is turned and sets the LED to match. It is the smallest project that reads something from the world and changes something in it.

What you learn

Reading a range with analogRead(), scaling it with map(), and dimming with analogWrite().

How it works

  1. input

    Dial (potentiometer)

  2. decides

    Arduino Uno

  3. output

    LED

Powered with 5 V from the Uno's USB cable. No battery and no soldering.

This circuit and sketch are run in the ManuStem simulator before the pack is published. Real parts vary between makers: follow the labels printed on your own module, not its position in the picture.