Updated platform to pioarduino, since default platform is old and deprecated.

This solved the compile issues and enabled use of VScode for development. Hint from this post on github: https://github.com/espressif/arduino-esp32/issues/10721
This commit is contained in:
2025-06-20 16:54:57 +02:00
parent 1a92672603
commit 8087774c89
9 changed files with 29 additions and 17 deletions

6
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
# This file was automatically generated for projects
# without default 'CMakeLists.txt' file.
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
idf_component_register(SRCS ${app_sources})

View File

@@ -31,7 +31,7 @@ void GPIO_Init() {
/************************************************************* RGB *************************************************************/
void RGB_Light(uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
neopixelWrite(GPIO_PIN_RGB, green_val, red_val, blue_val); // RGB color adjustment
rgbLedWrite(GPIO_PIN_RGB, green_val, red_val, blue_val); // RGB color adjustment
}
RGB_Indicate RGB_indicate[RGB_Indicate_Number];
static uint8_t RGB_indicate_Num = 0;

View File

@@ -14,8 +14,8 @@ char sub[] = MQTT_Sub; // MQTT subscribe to topics
WiFiClient espClient; //MQTT initializes the contents
PubSubClient client(espClient);
StaticJsonDocument<400> sendJson;
StaticJsonDocument<400> readJson;
JsonDocument sendJson;
JsonDocument readJson;
unsigned long lastUpdateTime = 0;
char msg[MSG_BUFFER_SIZE];
bool WIFI_Connection = 0;