7 Segment Display
BY SOHAM ROBOTICS
YOUTUBE LINK :-
Material
Arduino UNO : https://www.google.com/aclk?sa=L&ai=DChcSEwjqmcuRo...
7 Segment Display : https://www.google.com/aclk?sa=L&ai=DChcSEwjuz9ywo...
Jumper Wires and Breadboard : https://www.google.com/aclk?sa=L&ai=DChcSEwjeqvvbo...
Circuit
Code
int f = 13; int g = 12; int e = 11; int d = 10; int c = 9; int b = 8; int a = 7; //7 Segment pin int de=1000; // delay time void setup() { pinMode(f, OUTPUT); pinMode(g, OUTPUT); pinMode(e, OUTPUT); pinMode(d, OUTPUT); pinMode(c, OUTPUT); pinMode(b, OUTPUT); pinMode(a, OUTPUT); } void loop() { digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,1); digitalWrite(e,1); digitalWrite(f,1); digitalWrite(g,0); // 0 delay(de); digitalWrite(a,0); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,0); digitalWrite(e,0); digitalWrite(f,0); digitalWrite(g,0); // 1 delay(de); digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,0); digitalWrite(d,1); digitalWrite(e,1); digitalWrite(f,0); digitalWrite(g,1); // 2 delay(de); digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,1); digitalWrite(e,0); digitalWrite(f,0); digitalWrite(g,1); // 3 delay(de); digitalWrite(a,0); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,0); digitalWrite(e,0); digitalWrite(f,1); digitalWrite(g,1); // 4 delay(de); digitalWrite(a,1); digitalWrite(b,0); digitalWrite(c,1); digitalWrite(d,1); digitalWrite(e,0); digitalWrite(f,1); digitalWrite(g,1); // 5 delay(de); digitalWrite(b,0); digitalWrite(c,1); digitalWrite(d,1); digitalWrite(e,1); digitalWrite(f,1); digitalWrite(g,1); // 6 delay(de); digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,0); digitalWrite(e,0); digitalWrite(f,0); digitalWrite(g,0); // 7 delay(de); digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,1); digitalWrite(e,1); digitalWrite(f,1); digitalWrite(g,1); // 8 delay(de); digitalWrite(a,1); digitalWrite(b,1); digitalWrite(c,1); digitalWrite(d,0); digitalWrite(e,0); digitalWrite(f,1); digitalWrite(g,1); // 0 delay(de); }