Tuesday, October 13, 2009

Andrew Zahn Number Two

This is my movie and code - but I could not get it running - Will check in class


int ledPins[] = {1,2,3,4};
int potPin = 1;
int potValue = 1;
int timer = 100;

void setup() {
  
int whatPin;

for (int thisPin = 0; thisPin;) 

pinMode(ledPins[whatPin], OUTPUT);
}




void loop() {

potValue = analogRead(potPin);
int Timer1;
int Timer2;


if(potValue >= 50) {
  
for (int whatPin = 0; whatPin  >

digitalWrite(ledPins[whatPin], HIGH);
delay(newTimer1);
digitalWrite(ledPins[whatPin], LOW);

}
}


if(potValue <= 49) {
for (int whatPin = pinCount - 1; whatPin >= 0; whatPin--) {
  

digitalWrite(ledPins[whatPin], HIGH);
delay(Timer2);
digitalWrite(ledPins[whatPin], LOW);

}
}
}

No comments:

Post a Comment