#define LED1 13 void setup() { Serial.begin(9600); pinMode(LED1, OUTPUT); digitalWrite(LED1, LOW); } void loop() { digitalWrite(LED1, HIGH); //LED1 is ON int onPeriodF1 = map(analogRead(A0), 0, 1023, 0, 500); delay(onPeriodF1); //--------------- digitalWrite(LED1, LOW); //LED1 is ON int offPeriodF1 = map(analogRead(A1), 0, 1023, 0, 1000); delay(offPeriodF1); digitalWrite(LED1, LOW); //LED1 OFF }