diff --git a/platformio.ini b/platformio.ini index 586388f..5a16927 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,6 +14,9 @@ platform = espressif32 framework = arduino board = lolin_d32_pro +;powersave +board_build.f_cpu = 160000000L + build_flags = -DLOG_DEFAULT_LEVEL=ESP_LOG_VERBOSE -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE diff --git a/src/main.cpp b/src/main.cpp index 2caf631..46c4aa0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -523,6 +523,8 @@ void setup() ota.update(); } + WiFi.setSleep(true); + ESP_LOGD(TAG, "connecting to MQTT"); mqtt.begin();