Project 10: Make an LED Bar Graph Display (barGraph)

Created on: 2 August 2012
Updated on: 17 January 2023

Tutorial 10 – Pages

A potentiometer is used to change the analog value on the Arduino A0 pin. Ten LEDs are connected to Arduino pins 2 to 11. As the voltage value on A0 increases, LEDs making up a bar graph turn on in sequence.

Either 10 individual LEDs, or a 10 LED bar graph component can be used in this easy breadboard circuit for beginners. Program an Arduino Uno using an example sketch that is built into the Arduino IDE.

Parts Needed

Besides an Arduino Uno or compatible board, USB cable, breadboard and wire links, you will need:

  • 10 × LEDs or a 10 Segment LED Bar Graph
  • 10 × 220 ohm resistors
  • 1 × 10k potentiometer

Arduino Website Page


Project 10 Video

This video shows the Arduino LED bar graph project in action.

In the Arduino IDE

File → Examples → 7.Display → barGraph

Building the Circuit

The circuit diagram and breadboard connections are shown on the barGraph page on the Arduino website.

Programming and Operating the Circuit

Find the barGraph sketch in the Arduino IDE under File → Examples → 7.Display → barGraph and upload it to the Arduino board.

Turn the shaft of the potentiometer to make the LEDs switch on in turn.