Using the LEDDisplay library LEDDisplay is an easy to use library that makes light work of multi-digit 7segment displays. If you need help building the circuit or understanding the concepts, then refer to this guide: Arduino multiple digit, 7 segment display tutorial. Answering questions and getting help Get help from the community forum for LEDDisplay, or use the help widget (on the right) to contact us about commercial support on LEDDisplay Setting up the LEDDisplay library Before using any methods from the library, and usually in the global scope (outside of any function) you need to include the header file and initialise the library.
If you've got a 7 segment display but are not sure if it is common anode or common cathode, then you need to check the polarity of the display. This is easily done with a low voltage supply (9V or less) from a battery, bench PSU or Arduino board. Firstly and before anything else, connect a 1K resistor between the common pin and the battery. This will avoid potential damage to the LED's in the display.
Measuring voltage from an analog input. Following on from the previous example ( example for driving 7 segment LED displays ). we now build on the same circuit to make a simple voltage meter. Additional requirements: Potentiometer of at least 10Kohms. In order to measure voltage, we need to use an Arduino board analog input. Usually these are marked separately as “analog in”. We are going to use a potentiometer to adjust the voltage at the analog input.
On the previous page covering single digit displays, we dealt with driving one 7-segment digit. On this page we’ll use a multi-digit display and assume 4 digits. Just like single devices, multi-digit 7-segment displays have connections for A-G, DP and common, but they have a common pin for each digit, with one set of A-G and DP pins that are shared. So for a 4 digit display there will be four common pins.
This Arduino library makes it easy to drive a multiple digit 7 segment display with the option of using a timer1 interrupt to constantly redraw the digits. Therefore, this avoids having to call in continuously to refresh the display. Flexibility was the main goal and as such methods are available to write decimal, floating point, hex and character data onto the display. Many examples are provided with the library. Many thanks to http://www.
In this tutorial I show you how to connect a 7 segment display to an Arduino board. For a tutorial showing how to drive 4 or 8 digit displays see (Arduino multiple digit, 7 segment display tutorial). Firstly, we must know what type of display we have as there are two possible forms, common cathode and common anode. If the display is common cathode, then the LOWER voltage side is common, if the display is common anode, then the HIGHER voltage side is common.