Created
December 8, 2021 06:15
-
-
Save cipherwithadot/6cf73eb4131007b05047c2899aa34a2f to your computer and use it in GitHub Desktop.
Very Simple Traffic Light Simulation With Arduino!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//My Traffic Light Simulation With Arduino | |
void setup() | |
{ | |
pinMode(9, OUTPUT); | |
pinMode(10, OUTPUT); | |
pinMode(11, OUTPUT); | |
} | |
void loop() | |
{ | |
digitalWrite(11, LOW); | |
digitalWrite(9, HIGH); | |
delay(2000); // Wait for 2000 millisecond(s) | |
digitalWrite(9, LOW); | |
digitalWrite(10, HIGH); | |
delay(2000); // Wait for 2000 millisecond(s) | |
digitalWrite(10, LOW); | |
digitalWrite(11, HIGH); | |
delay(2000); // Wait for 2000 millisecond(s) | |
digitalWrite(11, LOW); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment