All tutorials

3 · Outputs & actuators

7-segment display

Advanced22 min

Goal

Count from 0 to 9 on a segment display.

Why it matters

A digit → segments lookup table is the first digital “font”.

Steps

  1. 01Add the 7-segment display.
  2. 02Create const byte digits[10] with each digit pattern.
  3. 03Write show(n) applying the 7 bits.
  4. 04Count from 0 to 9 with a one-second pause.

This tutorial runs inside the Circuitly simulator: your wiring and your code are checked automatically at every step.

Next tutorials