From 77e7330639d04e33619d115232eb6b97ad2717df Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 26 Aug 2023 17:28:21 +0700 Subject: [PATCH] fix pwm init bug --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 12146af..dc16c34 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -79,6 +79,7 @@ void setup() Serial.begin(115200); Serial.println("ESPMega R3 Initializing . . ."); ESPMega_begin(); + io_begin(); network_begin(); Serial.println("Initializing MQTT . . ."); mqtt_connect(); @@ -99,7 +100,9 @@ void io_begin() { Serial.println("Initializing I/O . . ."); memset(pwm_states, 0, PWM_COUNT); - memset(pwm_values, 255, PWM_COUNT); + for(int i=0;i