Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup (void)
- {
- // set digital pin 11 to output
- int i=2;
- int LED_PIN;
- for(;i<10;i++)
- {
- LED_PIN = i;
- pinMode(LED_PIN, OUTPUT);
- }
- }
- void loop (void)
- {
- int i=2;
- int LED_PIN;
- for(;i<10;i++)
- {
- LED_PIN=i;
- // Set Pin to high level (LED on)
- digitalWrite(LED_PIN, LOW);
- // Wait for 1s
- delay (1000);
- digitalWrite(LED_PIN, HIGH);
- // Wait for 1s
- delay (1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement