Tuesday, October 13, 2009

Andrew Zahn Number One

video

int potpin = 0;
int ledpin = 11; 
int ledvalue = 0;
int potvalue = 0;

void setup(){

pinMode(ledpin, OUTPUT);

}


void loop(){
  
  potvalue =analogRead(potpin);
  ledvalue = potvalue / 4;
  analogWrite(ledpin, ledvalue);
  delay(1);
}

No comments:

Post a Comment