Advertisement
Mouamle

Shifting

Jun 21st, 2015
3,503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int L = 13;
  2.  
  3. void setup() {
  4.   pinMode(13, OUTPUT);
  5.   pinMode(14, OUTPUT);
  6.   pinMode(15, OUTPUT);
  7.   pinMode(16, OUTPUT);
  8.   pinMode(17, OUTPUT);
  9. }
  10.  
  11. void loop() {
  12.   digitalWrite(L, HIGH);
  13.   delay(1000);
  14.   digitalWrite(L, LOW);
  15.   delay(1000);
  16.  
  17.   L = L++;
  18.  
  19.   digitalWrite(L, HIGH);
  20.   delay(1000);
  21.   digitalWrite(L, LOW);
  22.   delay(1000);
  23.  
  24.   L = L++;
  25.  
  26.   digitalWrite(L, HIGH);
  27.   delay(1000);
  28.   digitalWrite(L, LOW);
  29.   delay(1000);
  30.  
  31.   L = L++;
  32.  
  33.  
  34.   digitalWrite(L, HIGH);
  35.   delay(1000);
  36.   digitalWrite(L, LOW);
  37.   delay(1000);
  38.  
  39.   L = L++;
  40.  
  41.  
  42.   digitalWrite(L, HIGH);
  43.   delay(1000);
  44.   digitalWrite(L, LOW);
  45.   delay(1000);
  46.  
  47.   L = L++;
  48.  
  49.   if ( L >= 18){
  50.     L = 13;
  51.   }
  52.  
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement