Browse Source

esp powersave

ir
Hendrik Langer 5 years ago
parent
commit
6815aeacae
  1. 3
      platformio.ini
  2. 2
      src/main.cpp

3
platformio.ini

@ -14,6 +14,9 @@ platform = espressif32
framework = arduino framework = arduino
board = lolin_d32_pro board = lolin_d32_pro
;powersave
board_build.f_cpu = 160000000L
build_flags = build_flags =
-DLOG_DEFAULT_LEVEL=ESP_LOG_VERBOSE -DLOG_DEFAULT_LEVEL=ESP_LOG_VERBOSE
-DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE -DLOG_LOCAL_LEVEL=ESP_LOG_VERBOSE

2
src/main.cpp

@ -523,6 +523,8 @@ void setup()
ota.update(); ota.update();
} }
WiFi.setSleep(true);
ESP_LOGD(TAG, "connecting to MQTT"); ESP_LOGD(TAG, "connecting to MQTT");
mqtt.begin(); mqtt.begin();

Loading…
Cancel
Save