The seven segment display is simply a group of seven LEDs connected together and placed inside a nice enclosure to give the shape of a number when those LEDs are illuminated with a certain combination.
7 segment display
Arduino UNO or Arduino Mega or Arduino Micro
Some wires
Circuit
void setup()
{  // define pin modes pinMode(2,OUTPUT); pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(6,OUTPUT); pinMode(7,OUTPUT); pinMode(8,OUTPUT); }void loop() 
{  // loop to turn leds od seven seg ON   for(int i=2;i<9;i++)  {    digitalWrite(i,HIGH);    delay(600);  }  // loop to turn leds od seven seg OFF  for(int i=2;i<9;i++)  {    digitalWrite(i,LOW);    delay(600);  }   delay(1000);}
This shows how it's so easy to interface a seven segment display to the Arduino board.
Read this article on AeroArduino.com
Source:
https://www.allaboutcircuits.com/projects/interface-a-seven-segment-display-to-an-arduino/
Check our books on Amazon:
 



 
 
No comments:
Post a Comment