Untitled
Anonymous
plain_text
12/25/2023 8:03 AM
972 B
20
Indexable
void startTimer() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Timer started!");
while (minutes > 0 || seconds > 0) {
updateTimerDisplay();
delay(1000);
seconds--;
if (seconds < 0) {
minutes--;
seconds = 59;
}
}
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Timer finished!");
// 倒數結束後重置時間並重新開始倒數
RGBLED_blink();
RGBLED_OFF();
} Editor is loading...
Leave a Comment