int buttonPin = 10;
int buzzerPin = 11;
unsigned long startTime;
bool timerRunning = false;
void setup() {
// Put your initial setup code here, to run once:
pinMode(buttonPin, INPUT);
attachInterrupt(digitalPinToInterrupt(buttonPin), resetTimer, FALLING); // Configure the buttonPin as interrupt
pinMode(buzzerPin, OUTPUT);
}
void loop() {
// Implement the countdown timer here
if (timerRunning) {
unsigned long passedTime = millis() - startTime; // Size in milliseconds
if (passedTime >= 24000) {
buzzerSignal();
timerRunning = false;
} else {
int remainingTime = (24000 - passedTime) / 1000; // Convert to seconds
// Update the display with the remaining time