7-Segment Display Using Arduino


Kids Arduino Project

πŸš€ Welcome to Arduino & Robotics Projects for Kids πŸš€

Arduino and Robotics Projects

for Kids | Grade 5,6,7,8,9,10

Project Title

7-Segment Display using arduino.

Description

A 7-segment display is a simple electronic display device used to show numbers and limited characters.It is widely used in digital systems because of its low cost and easy interface.A 7-segment display consists of seven individual LED segments.These segments are arranged in a rectangular pattern.Each segment is labeled using letters from a to g.An additional segment called the decimal point (dp) is sometimes included.Each segment can be turned ON or OFF independently.By combining different segments,numbers from 0 to 9 can be displayed.The display is commonly used in electronic devices.Examples includes calculators,clocks,meters,and counters.

Components Used

  • Arduino Uno board
  • 7-segment display
  • 220Ξ© resistor
  • Breadboard
  • Jumper wires
  • USB cable programming

Connection Steps

  • 7-segment pins(a-g)connection
  • Segmentβ€”-Ardunio Pin
  • aβ€”β€”β€”β€”-2
  • bβ€”β€”β€”β€”-3
  • cβ€”β€”β€”β€”-4
  • dβ€”β€”β€”β€”-5
  • eβ€”β€”β€”β€”-6
  • fβ€”β€”β€”β€”-7
  • gβ€”β€”β€”β€”-8
  • Common cathode pin–GND
  • Connect to the arduino UNO Board
  • Upload Arduino code

Arduino Code


// Pin definitions for segments a, b, c, d, e, f, g
int segments[] = {2, 3, 4, 5, 6, 7, 8};

// Array representing segments to turn ON for numbers 0-9
// 1 = ON, 0 = OFF (Common Cathode)
byte digits[10][7] = {
  {1, 1, 1, 1, 1, 1, 0}, // 0
  {0, 1, 1, 0, 0, 0, 0}, // 1
  {1, 1, 0, 1, 1, 0, 1}, // 2
  {1, 1, 1, 1, 0, 0, 1}, // 3
  {0, 1, 1, 0, 0, 1, 1}, // 4
  {1, 0, 1, 1, 0, 1, 1}, // 5
  {1, 0, 1, 1, 1, 1, 1}, // 6
  {1, 1, 1, 0, 0, 0, 0}, // 7
  {1, 1, 1, 1, 1, 1, 1}, // 8
  {1, 1, 1, 1, 0, 1, 1}  // 9
};

void setup() {
  for (int i = 0; i < 7; i++) {
    pinMode(segments[i], OUTPUT);
  }
}

void displayDigit(int digit) {
  for (int i = 0; i < 7; i++) {
    digitalWrite(segments[i], digits[digit][i]);
  }
}

void loop() {
  for (int i = 0; i < 10; i++) {
    displayDigit(i);
    delay(1000); // Wait 1 second
  }
}

Applications

  • Digital clocks and watches.
  • Electronic Counters.
  • Scoreboards.
  • Calculators.
  • Elevator floor display.
  • Voltage meters.
  • Timer system.

More about this Project name 7 segment display

What is 7-segment display?

  • A 7 segment display is an electronic display device made up of seven leds(segments)arranged in a rectangular pattern.Each segment is labeled from a to g,and by turning ON/OFF specific segments,you can display digits from 0 to 9.Some displays also include an eighth segment called the decimal point(dp).
  • There are two main types of 7 segment displays:-
  • 1.Common Cathode(CC):All cathodes are connected together and tied to ground.A segment lights up when you apply HIGH(5V)to its pin.
  • 2.Common Anode(CA):All anodes are connected together and tied to VCC(5V).A segment lights up when you apply LOW(0V)to its pin.

  • Working principle:-
  • Each segment of the display is controlled by one digital pin of the arduino.By sending HIGH or LOW Signals,you can turn individual segments ON or OFF.By combining multiple segments you form numbers. Each segment works like a small LED. When voltage is applied:-
  • 1.Current flows
  • 2.LED glows
  • By controlling each segment:
  • 1.Different shapes are formed
  • 2.Numbers are displayed
  • Example:
  • 1.Number 0β€”all segments except g
  • 2.Number 1β€”only b and c
  • 3.Number 2β€”a,b,d,e,g
  • 4.Number 8β€”all segments ON

Advantages:-

  • simple and low cost
  • Easy to interface with arduino
  • Good for beginners
  • Low power consumption
  • Good for numeric display

Disadvantages:-

1.Cannot display complex characters
2.Limited to numbers and few letters
3.Uses multiple pins
4.Not suitable for long text

Limitation:-

  • Can display only limited characters
  • Needs multiple pins
  • Not suitable for complex text display

Project Preview

Project Image

Β© 2026 Kids Arduino Projects | Learn β€’ Build β€’ Innovate




















Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
MIT India