LED bar graph

We all hate progress bars! They are always delaying us from doing something. But in the Arduino world they can be very handy. Here, we will see how to build one with LEDs. An LED bar graph is just a bunch of LEDs put together in a fancy case, but there are many uses for it. We can display the date from a sensor, show a critical condition, or make a funny light show with it.

Getting ready

We will need the following ingredients to execute this recipe:

  • An Arduino board connected to the computer via USB
  • A breadboard and jumper wires
  • An LED bar graph
  • Resistors between 220–1,000 ohm

How to do it…

Following are the steps to connect a 10-segment bar graph to the Arduino:

  1. Mount the LED bar graph onto the breadboard.
  2. If the bar graph is a common anode ...

Get Arduino Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.