Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {              
  2.   pinMode(11, OUTPUT);      //Initilizes pin 11 as an output
  3.   pinMode(12, OUTPUT);      //Initilizes pin 12 as an output
  4.   digitalWrite(11, HIGH);   // set the LED on
  5.   delay(1000);              // wait for a second
  6.   digitalWrite(11, LOW);    // set the LED off
  7.   delay(1000);              // wait for a second
  8.   digitalWrite(11, HIGH);   // set the LED on
  9.   delay(1000);              // wait for a second
  10.   digitalWrite(11, LOW);    // set the LED off
  11.   delay(1000);              // wait for a second
  12.   digitalWrite(11, HIGH);   // set the LED on
  13.   delay(1000);              // wait for a second
  14.   digitalWrite(11, LOW);    // set the LED off
  15.   delay(1000);              // wait for a second
  16.   digitalWrite(11, HIGH);   // set the LED on
  17.   delay(1000);              // wait for a second
  18.   digitalWrite(11, LOW);    // set the LED off
  19.   delay(1000);              // wait for a second
  20.   digitalWrite(11, HIGH);   // set the LED on
  21.   delay(1000);              // wait for a second
  22.   digitalWrite(11, LOW);    // set the LED off
  23.   delay(1000);              // wait for a second
  24.   digitalWrite(11, LOW);   // turns bothe LED's off so it looks right
  25.   digitalWrite(12, LOW);  
  26.   delay(1000);  
  27. }
  28.  
  29. void loop() {
  30.   digitalWrite(11, HIGH);   // set LED 1 on
  31.   digitalWrite(12, LOW);   // set LED 2 off
  32.   delay(1000);              // wait for a second
  33.   digitalWrite(11, LOW);    // set LED 1 off
  34.   digitalWrite(12, HIGH);   // set LED 2 on
  35.   delay(1000);              // wait for a second
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement