From c3ffe4bad7a26c28492fa12ff6ffa7c64526b4e3 Mon Sep 17 00:00:00 2001 From: Alejo R Minetti Date: Sat, 4 Feb 2023 15:16:29 -0300 Subject: [PATCH 1/2] test OK in ESP32 wemos battery --- platformio.ini | 6 ++++++ src/LightStateService.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index f83cf677..1efbf9f0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -52,3 +52,9 @@ board_build.partitions = min_spiffs.csv platform = espressif32 board = node32s board_build.filesystem = littlefs + +[env:wemosbat] +board_build.partitions = min_spiffs.csv +platform = espressif32 +board = wemosbat +board_build.filesystem = littlefs \ No newline at end of file diff --git a/src/LightStateService.h b/src/LightStateService.h index f2aab6c7..16f1244c 100644 --- a/src/LightStateService.h +++ b/src/LightStateService.h @@ -7,7 +7,7 @@ #include #include -#define LED_PIN 2 +#define LED_PIN BUILTIN_LED #define DEFAULT_LED_STATE false #define OFF_STATE "OFF" From 7a9c7f4e7f1d3358b407a4eee12bbff6d48a52b7 Mon Sep 17 00:00:00 2001 From: Alejo R Minetti Date: Sat, 4 Feb 2023 15:16:29 -0300 Subject: [PATCH 2/2] test OK on ESP32 wemos battery, wemos mini D1 pro and nodemcu, in both esp8266 reset detected on manual high frequency in websockets toggle. --- platformio.ini | 17 +++++++++++++++++ src/LightStateService.h | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index f83cf677..9df4c0a4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -46,9 +46,26 @@ board = esp12e board_build.f_cpu = 160000000L board_build.filesystem = littlefs +[env:nodemcu] +platform = espressif8266 +board = nodemcu +board_build.filesystem = littlefs + [env:node32s] ; Comment out min_spiffs.csv setting if disabling PROGMEM_WWW with ESP32 board_build.partitions = min_spiffs.csv platform = espressif32 board = node32s board_build.filesystem = littlefs + +[env:esp32wbat] +board_build.partitions = min_spiffs.csv +platform = espressif32 +board = wemosbat +board_build.filesystem = littlefs + +[env:wemos mini pro] +board_build.partitions = min_spiffs.csv +platform = espressif8266 +board = d1_mini_pro +board_build.filesystem = littlefs \ No newline at end of file diff --git a/src/LightStateService.h b/src/LightStateService.h index f2aab6c7..c76e5f40 100644 --- a/src/LightStateService.h +++ b/src/LightStateService.h @@ -7,7 +7,7 @@ #include #include -#define LED_PIN 2 +#define LED_PIN LED_BUILTIN #define DEFAULT_LED_STATE false #define OFF_STATE "OFF" @@ -16,8 +16,8 @@ // Note that the built-in LED is on when the pin is low on most NodeMCU boards. // This is because the anode is tied to VCC and the cathode to the GPIO 4 (Arduino pin 2). #ifdef ESP32 -#define LED_ON 0x1 -#define LED_OFF 0x0 +#define LED_ON 0x0 +#define LED_OFF 0x1 #elif defined(ESP8266) #define LED_ON 0x0 #define LED_OFF 0x1