Professional Documents
Culture Documents
Traffic Light Control
Traffic Light Control
Traffic Light Control
digitalWrite(12,0);
digitalWrite(8,HIGH);
digitalWrite(12,0);
digitalWrite(8,HIGH);
Let’s assume that Busy Lane has to have its green traffic light
on for 10 seconds from west to east and west to south. While
another not busy lane has to have its green traffic light on for 5
seconds from South to East and South to West.
+(1)
+(1)
+(1)
+(1)
-(0)
-(0)
+(1)
-(0)
Common Cathode
Question?
Design a circuit of an interface a seven
segment LED display to an Arduino
microcontroller. Then write a C program to
display digits from 0 to 9 with the interval of
1 second.
Remaarks
D2 D3 D4 D5 D6 D7 D8
Digits
a b c d e f g
1 1(on) 1(on)
8
Example of call a function
Seven Segment Display