RuiViana

PiscaLED_RCB

Jul 19th, 2016
145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. byte MyArray[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  3. //------------------------------
  4. void setup()
  5. {
  6.   for (int i = 0; i < 10; i++)
  7.   {
  8.     pinMode(MyArray[i], OUTPUT);
  9.   }
  10. }
  11. //---------------------------
  12. void loop()
  13. {
  14.   for (int i = 0; i < 10; i++)
  15.   {
  16.     digitalWrite(MyArray[i], LOW);
  17.   }
  18.   for (int i = 0; i < 10; i++)
  19.   {
  20.     delay(1000);
  21.     digitalWrite(MyArray[i], HIGH);
  22.   }
  23.   delay(1000);
  24. }
RAW Paste Data