Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int time = 500;
- int inittime = 50;
- void setup() // inital setup
- {
- for(int i=9; i>=2; i--) // Loops from i=9 down to and including i=2
- {
- pinMode(i, OUTPUT); // sets pin i the digital pin as output
- delay(inittime); // waits for inittime
- }
- }
- void loop()
- {
- for(int i=2; i<10; i++) // Loops from i=2 up to but not including i=10
- {
- digitalWrite(i, LOW); // sets the LED on
- delay(time); // waits for time
- digitalWrite(i, HIGH); // sets the LED off
- delay(time); // waits for time
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement