Plan
Board
Made with Fritzing
Code
int pinPot = 2;
int pinLED = 13;
int val = 0;
void setup() {
pinMode(pinLED, OUTPUT);
}
void loop() {
val = analogRead(pinPot);
digitalWrite(pinLED, HIGH);
delay(val);
digitalWrite(pinLED, LOW);
delay(val);
}
Download
Fritzing: poti_led.fzz