int pot_value = 27; // select the input pin for the potentiometer int ledPin = 19; // select the pin for the LED int sensorValue = 0; // variable to store the value coming from the sensor void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT pinMode(pot_value, INPUT); //declare the pot_value as an INPUT } void loop() { // read the value from the potentiometer: sensorValue = analogRead(pot_value); //led blinking //turn led on digitalWrite(ledPin, HIGH); // stop the program for milliseconds: delay(sensorValue); //turn led off digitalWrite(ledPin, LOW); // stop the program for milliseconds: delay(sensorValue); }