void setup() { pinMode(3, OUTPUT); } void loop() { int Time = analogRead(A0); Time = map(Time, 0, 1023, 20, 1000); digitalWrite(3,HIGH); delay(Time); digitalWrite(3,LOW); delay(Time); }