int input=A0; //The word “input” now stands for the value “A0”
int LED=13; //”LED” now stand for the value 13
int sensorvalue=0; //Variable for the sensorvalue with 0 as starting value
void setup()
{ //The setup begins here
pinMode (LED,OUTPUT); //The pin 13 connected to the LED is defined as an output
}
void loop()
{ //The loop part begins here
sensorvalue= analogRead(input); //The voltage at the potentiometer is read
//out and gets saved as a number between 0 and 1023 under “sensorvalue”
digitalWrite (LED,HIGH); //Turn on LED
delay(sensorvalue); //The value, which is saved under “sensorvalue” defines
//how long the LED will light up (milliseconds)
digitalWrite(LED, LOW); //Turn off LED
delay(sensorvalue);
}