Zoiets misschien.
clock();
if (seconds >= Time){
toggleState = false; clock_reset();}
if (reading != lastButtonState) {
// reset the debouncing timer
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) > debounceDelay) {
buttonState = reading;
}
lastButtonState = reading;
if (buttonState == LOW)
if (toggleReading == 0)
{toggleReading = 1;
if (toggleState == 0) {toggleState = 1; clock_reset();}
else {toggleState = 0;}
}}
if (buttonState == HIGH)
{if (toggleReading == 1) {toggleReading = 0;}
}
// set the LED using the state of the button:
digitalWrite(ledPin, toggleState);