uas_arduino

Flash 7 Segment

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