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:
18
.vscode/launch.json
vendored
18
.vscode/launch.json
vendored
@@ -12,9 +12,9 @@
|
|||||||
"type": "platformio-debug",
|
"type": "platformio-debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "PIO Debug",
|
"name": "PIO Debug",
|
||||||
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
|
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
|
||||||
"projectEnvName": "esp32-s3-devkitm-1",
|
"projectEnvName": "esp32-s3-waveshare8",
|
||||||
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
|
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
|
||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"preLaunchTask": {
|
"preLaunchTask": {
|
||||||
"type": "PlatformIO",
|
"type": "PlatformIO",
|
||||||
@@ -25,18 +25,18 @@
|
|||||||
"type": "platformio-debug",
|
"type": "platformio-debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "PIO Debug (skip Pre-Debug)",
|
"name": "PIO Debug (skip Pre-Debug)",
|
||||||
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
|
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
|
||||||
"projectEnvName": "esp32-s3-devkitm-1",
|
"projectEnvName": "esp32-s3-waveshare8",
|
||||||
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
|
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
|
||||||
"internalConsoleOptions": "openOnSessionStart"
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "platformio-debug",
|
"type": "platformio-debug",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "PIO Debug (without uploading)",
|
"name": "PIO Debug (without uploading)",
|
||||||
"executable": "d:/Emanuele/Documenti/VScode/ETcontroller_PRO/.pio/build/esp32-s3-devkitm-1/firmware.elf",
|
"executable": "C:/Users/ematr/Documents/VScode/ETcontroller_PRO/.pio/build/esp32-s3-waveshare8/firmware.elf",
|
||||||
"projectEnvName": "esp32-s3-devkitm-1",
|
"projectEnvName": "esp32-s3-waveshare8",
|
||||||
"toolchainBinDir": "C:/Users/Emanuele Trabattoni/.platformio/packages/toolchain-xtensa-esp32s3/bin",
|
"toolchainBinDir": "C:/Users/ematr/.platformio/packages/toolchain-xtensa-esp-elf/bin",
|
||||||
"internalConsoleOptions": "openOnSessionStart",
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
"loadMode": "manual"
|
"loadMode": "manual"
|
||||||
}
|
}
|
||||||
|
|||||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"esp32-hal.h": "c"
|
||||||
|
}
|
||||||
|
}
|
||||||
3
CMakeLists.txt
Normal file
3
CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||||
|
project(ETcontroller_PRO)
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
cda0d1d4f19a5b63f560f45fa5bf4bc81f42e811
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
; Please visit documentation for the other options and examples
|
; Please visit documentation for the other options and examples
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[env:esp32-s3-devkitm-1]
|
[env:esp32-s3-waveshare8]
|
||||||
platform = espressif32
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip
|
||||||
board = esp32-s3-devkitm-1
|
board = esp32-s3-waveshare8
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps =
|
lib_deps =
|
||||||
bblanchon/ArduinoJson@^7.4.2
|
bblanchon/ArduinoJson@^7.4.2
|
||||||
|
|||||||
6
src/CMakeLists.txt
Normal file
6
src/CMakeLists.txt
Normal 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})
|
||||||
@@ -31,7 +31,7 @@ void GPIO_Init() {
|
|||||||
|
|
||||||
/************************************************************* RGB *************************************************************/
|
/************************************************************* RGB *************************************************************/
|
||||||
void RGB_Light(uint8_t red_val, uint8_t green_val, uint8_t blue_val) {
|
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];
|
RGB_Indicate RGB_indicate[RGB_Indicate_Number];
|
||||||
static uint8_t RGB_indicate_Num = 0;
|
static uint8_t RGB_indicate_Num = 0;
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ char sub[] = MQTT_Sub; // MQTT subscribe to topics
|
|||||||
WiFiClient espClient; //MQTT initializes the contents
|
WiFiClient espClient; //MQTT initializes the contents
|
||||||
PubSubClient client(espClient);
|
PubSubClient client(espClient);
|
||||||
|
|
||||||
StaticJsonDocument<400> sendJson;
|
JsonDocument sendJson;
|
||||||
StaticJsonDocument<400> readJson;
|
JsonDocument readJson;
|
||||||
unsigned long lastUpdateTime = 0;
|
unsigned long lastUpdateTime = 0;
|
||||||
char msg[MSG_BUFFER_SIZE];
|
char msg[MSG_BUFFER_SIZE];
|
||||||
bool WIFI_Connection = 0;
|
bool WIFI_Connection = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user