Back to Homepage

Arduino 4 Digit Segment Display

Little project experimenting with the Arduino Uno and 4 digit segment display. The outcome for this project was to create a script with functions which will allow me to draw specific segments to the desired digit positions with ease. The script contains a list of characters and functions to test drive the display.

Download code See on GitHub

Demo

Equipment

Instructions

Display diagram
Arduino Uno 4 Digit 7 Segment Display
pin 2 D1
pin 3 pin A
pin 4 pin F
pin 5 D2
pin 6 D3
pin 7 pin B
pin 9 D4
pin 10 pin G
pin 11 pin C
pin 12 pin D
pin 13 pin E

Take your Arduino Uno and the 12-pin 4-digit display. Proceed with connecting the 11 pins of the display to the Arduino following the pinout in the table above. Then you can download my code, and upload it to the board.

Functions

Function Description
BootTest() Runs tests on the display for each digit and segment.
DisplayKey(KEYS key, SEGMENT_POSITIONS position, int delayTime) Displays a chosen character in a specified digit position with delay.
PingPongOnce(KEY keys[6], int delayTime) Runs a ping-pong, ending on the first digit of the display (use when called once)
PingPongLoop(KEY keys[6], int delayTime) Runs a ping-pong, ending on the second digit of the display (use inside a loop)