Display Applications With Arduino

Published

Introduction: Display Applications With Arduino

About: Mechanical engineer, Entrepreneur, Maker, robotic systems expert and founder of Robimek and RobiBot

This project has been made to counter 9 to 0 with 7-segment display. The project has shown the necessary connections.

Step 1: Electronic Circuit Diagram

Step 2: Arduino Code

// Arduino pin: 2,3,4,5,6,7,8

// Arduino Pin Pin 7 Segment links

//2 7 (A)//3 6 (B)// 4 4 (C)// 5 2 (D)// 6 1 (E)//7 9 (F)// 8 10 (G)//9 5 (DP)

byte seven_seg_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,0,0,1,1 } // = 9};

void setup()

{

pinMode(2, OUTPUT);

pinMode(3, OUTPUT);

pinMode(4, OUTPUT);

pinMode(5, OUTPUT);

pinMode(6, OUTPUT);

pinMode(7, OUTPUT);

pinMode(8, OUTPUT);

pinMode(9, OUTPUT);

writeDot(0);

}

void writeDot(byte dot)

{

digitalWrite(9, dot);

}

void sevenSegWrite(byte digit)

{

byte pin = 2; for (byte segCount = 0;

segCount < 7; ++segCount)

{

digitalWrite(pin, seven_seg_digits[digit][segCount]);

++pin;

}

}

void loop()

{

for (byte count = 10;

count > 0; –count)

{

// Countdown to zero

delay(1000);

sevenSegWrite(count – 1);

}

delay(4000);

}

Step 3:

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Make it Move Contest

      Make it Move Contest
    • Microcontroller Contest

      Microcontroller Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments