int LEDpin = 8;
void setup() {
// put your setup code here, to run once:
pinMode(LEDpin, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int value = analogRead(A0);
digitalWrite(LEDpin, HIGH);
delay(value);
digitalWrite(LEDpin, LOW);
delay(value);
Serial.println(value);
}