daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.   Blink
  3.   Turns on an LED on for one second, then off for one second, repeatedly.
  4.  
  5.   Most Arduinos have an on-board LED you can control. On the Uno and
  6.   Leonardo, it is attached to digital pin 13. If you're unsure what
  7.   pin the on-board LED is connected to on your Arduino model, check
  8.   the documentation at http://arduino.cc
  9.  
  10.   This example code is in the public domain.
  11.  
  12.   modified 8 May 2014
  13.   by Scott Fitzgerald
  14.  */
  15.  
  16.  
  17. // the setup function runs once when you press reset or power the board
  18. void setup() {
  19.   // initialize digital pin 13 as an output.
  20.   pinMode(2, OUTPUT);
  21.   pinMode(3, OUTPUT);
  22.   pinMode(4, OUTPUT);
  23.   pinMode(5, OUTPUT);
  24.   pinMode(6, OUTPUT);
  25.   pinMode(7, OUTPUT);
  26.  
  27. }
  28.  
  29. // the loop function runs over and over again forever
  30. void loop() {
  31.   digitalWrite(2, HIGH);   // turn the LED on (HIGH is the voltage level)
  32.   digitalWrite(7, HIGH);
  33.   delay(1000);              // wait for a second
  34.   digitalWrite(2, LOW);    // turn the LED off by making the voltage LOW
  35.   digitalWrite(7, LOW);
  36.   delay(1000);  
  37.  
  38.   digitalWrite(3, HIGH);   // turn the LED on (HIGH is the voltage level)
  39.   digitalWrite(6, HIGH);
  40.   delay(1000);              // wait for a second
  41.   digitalWrite(3, LOW);    // turn the LED off by making the voltage LOW
  42.   digitalWrite(6, LOW);
  43.   delay(1000);  
  44.  
  45.   digitalWrite(4, HIGH);   // turn the LED on (HIGH is the voltage level)
  46.   digitalWrite(5, HIGH);
  47.   delay(1000);              // wait for a second
  48.   digitalWrite(4, LOW);    // turn the LED off by making the voltage LOW
  49.   digitalWrite(5, LOW);
  50.   delay(1000);  
  51.  
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top