// declaring the input and led pin number
const int LEDPin = 2;
const int potentioMeter = A2;
int sensorValue = 0;
void setup() {
pinMode(LEDPin, OUTPUT);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(potentioMeter);
digitalWrite(LEDPin, HIGH);
delay(sensorValue);
Serial.println(sensorValue);
digitalWrite(LEDPin, LOW);
delay(sensorValue);
}