Sering resrtart sendiri

This commit is contained in:
2025-12-13 20:30:43 +08:00
parent 94e3319c59
commit c8cdcbc772

View File

@@ -7,7 +7,8 @@
// DFPLAYER_RX_PIN = 15 // DFPLAYER_RX_PIN = 15
// DFPLAYER_TX_PIN = 16 // DFPLAYER_TX_PIN = 16
// BUSY_PIN = 17 (LOW = busy) // BUSY_PIN = 17 (LOW = busy)
//esp32 sda
//esp32 scl
#include <Arduino.h> #include <Arduino.h>
#include <WiFi.h> #include <WiFi.h>
@@ -27,13 +28,13 @@
#include <OneButton.h> #include <OneButton.h>
#define STATUS_LED_PIN 2 #define STATUS_LED_PIN 26
#define DFPLAYER_RX_PIN 16 //3 df #define DFPLAYER_RX_PIN 16 //3 df
#define DFPLAYER_TX_PIN 17 //2 df #define DFPLAYER_TX_PIN 17 //2 df
#define RELAY_PIN 19 #define RELAY_PIN 19
#define BUSY_PIN 23 #define BUSY_PIN 23
#define RESET_PIN 15 #define RESET_PIN 18
#define BUZZER_PIN 4 #define BUZZER_PIN 5
#define RESET_HOLD_MS 15000UL #define RESET_HOLD_MS 15000UL
#define MAX_SCHEDULES 20 #define MAX_SCHEDULES 20
@@ -676,6 +677,9 @@ void loop(){
buzzerState = false; buzzerState = false;
digitalWrite(BUZZER_PIN, LOW); digitalWrite(BUZZER_PIN, LOW);
} }
} else {
buzzerState = false;
digitalWrite(BUZZER_PIN, LOW);
} }
delay(10); // tiny yield delay(10); // tiny yield