int LED = 12;
int potpin = 0; // analog pin used to connect the potentiometer
int val; // variable to read the value from the analog pin
void setup() {
pinMode(LED, OUTPUT);
// put your setup code here, to run once:int LED=
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED, HIGH);
val = analogRead(potpin);
delay(val);
digitalWrite(LED, LOW);
delay(val);
}