All packs

Controls

Dial-controlled pointer

Turn a dial and a servo arm follows it through half a circle. The start of a gauge, a robot arm or a small gate.

  • Medium
  • about 25 min
  • Arduino Uno
  • No soldering
  • 6 parts
  • 6 wires
  • 18 lines of code
Try it in the simulator

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

Idea

A servo does not spin freely: it turns to the angle you ask for and holds it. Here the dial chooses the angle, so your hand moves the arm from a distance.

What you learn

Using the Servo library, and mapping a reading of 0 to 1023 onto an angle of 0 to 180.

How it works

  1. input

    Dial (potentiometer)

  2. decides

    Arduino Uno

  3. output

    Servo arm

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.