diff --git a/include/clockWork.hpp b/include/clockWork.hpp index 75d5e04..2a71bda 100644 --- a/include/clockWork.hpp +++ b/include/clockWork.hpp @@ -7,6 +7,8 @@ #include #include +#define LEDGPIO 27 + OpenWMap weather; BH1750 lightMeter(0x23); @@ -161,8 +163,7 @@ void ClockWork::initLedStrip(uint8_t num) { strip_RGBW = new NeoPixelBus(500); #elif defined(ESP32) strip_RGBW = - new NeoPixelBus(500, - 27); + new NeoPixelBus(500, LEDGPIO); #endif strip_RGBW->Begin(); } @@ -176,9 +177,8 @@ void ClockWork::initLedStrip(uint8_t num) { #ifdef ESP8266 strip_RGB = new NeoPixelBus(500); #elif defined(ESP32) - strip_RGB = - new NeoPixelBus( - 500, 27); + strip_RGB = new NeoPixelBus( + 500, LEDGPIO); #endif strip_RGB->Begin(); } diff --git a/platformio.ini b/platformio.ini index 01c9c04..65c3d69 100644 --- a/platformio.ini +++ b/platformio.ini @@ -36,6 +36,28 @@ board_build.partitions = partitions_singleapp_large.csv framework = arduino upload_speed = 921600 monitor_speed = 460800 +build_flags = + -Os + -ffunction-sections + -fdata-sections + -Wl,--gc-sections +lib_deps = + makuna/NeoPixelBus@^2.7.6 + bblanchon/ArduinoJson@^6.17.2 + links2004/WebSockets@2.4.1 + adafruit/RTClib@^1.11.2 + knolleary/PubSubClient@^2.8.0 + https://github.com/tzapu/WiFiManager#v2.0.17 + claws/BH1750@^1.3.0 +extra_scripts = pre:extra_scripts.py + +[env:esp32c3dev] +platform = espressif32 +board = esp32-c3-devkitc-02 +board_build.partitions = partitions_singleapp_large.csv +framework = arduino +upload_speed = 921600 +monitor_speed = 460800 build_flags = -Os -ffunction-sections diff --git a/src/Wortuhr.cpp b/src/Wortuhr.cpp index c2776fd..f837666 100644 --- a/src/Wortuhr.cpp +++ b/src/Wortuhr.cpp @@ -35,8 +35,8 @@ iUhrType *usedUhrType = nullptr; NeoPixelBus *strip_RGB = NULL; NeoPixelBus *strip_RGBW = NULL; #elif defined(ESP32) -NeoPixelBus *strip_RGBW = NULL; -NeoPixelBus *strip_RGB = NULL; +NeoPixelBus *strip_RGBW = NULL; +NeoPixelBus *strip_RGB = NULL; #endif WiFiClient client;