fbpx

Interface Sevensegment With Arduino

A seven segment display is use to display digits from 0-9.

  • Seven segment display widely used in digital clocks,weight machine, Ph meters etc.
  • The common configuration has an array of eight leds arranged to display these digits.
  • Led is assigned a name from a to h and is identified by its name.
  • Seven leds a to g are used to display the numerals while eighth led h is used to display the dot/decimal.

Logic Table

HardWare Required

  • 7Segment Display.
  • 220 ohms Resistor
  • Arduino Uno.

Circuit

Code

 #include "SevenSegment.h"
 SevenSegment tep = SevenSegment(0,1,2,3,4,5,6);
 char arr [10] = {'0','1','2','3','4','5','6','7','8','9'};
 int index;
 void setup()
 {
 index = 0;
 }
 void loop()
 {
 tep.display(arr[index++]);
 delay(1000);
 if(index == 11)
 index = 0;
 }

Leave a Reply

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