Sorry for the misunderstanding. I meant the Buttons on the LCD display. I fixed that problem, now I have a new one. I'm trying to turn on an led for 1 secs and turn it off for 3 secs. I was trying to manipulate the blink but it didn't work. Help?
int ledState = LOW;
long previousMillis = 0;
long intervalLow = 3000;
long intervalHigh = 1000;
unsigned long currentMillis1 = millis();
unsigned long currentMillis2 = millis();
if (ledState == LOW) {
if (currentMillis1 - previousMillis > intervalLow) {
previousMillis = currentMillis1;
ledState = HIGH;
digitalWrite(solenoidWater, ledState);
}
}
else {
if (currentMillis2 - previousMillis > intervalHigh) {
previousMillis = currentMillis2;
ledState = LOW;
digitalWrite(solenoidWater, ledState);
}
}