Skip to content

Commit

Permalink
Merge pull request #466 from nikolai2111/main
Browse files Browse the repository at this point in the history
Add: ESP32-C3 to the supported boards.
  • Loading branch information
dbambus authored Oct 19, 2024
2 parents 2dcb924 + 67d60b4 commit 063cf74
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
10 changes: 5 additions & 5 deletions include/clockWork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <Arduino.h>
#include <BH1750.h>

#define LEDGPIO 27

OpenWMap weather;
BH1750 lightMeter(0x23);

Expand Down Expand Up @@ -161,8 +163,7 @@ void ClockWork::initLedStrip(uint8_t num) {
strip_RGBW = new NeoPixelBus<NeoGrbwFeature, Neo800KbpsMethod>(500);
#elif defined(ESP32)
strip_RGBW =
new NeoPixelBus<NeoGrbwFeature, NeoEsp32I2s1X8Sk6812Method>(500,
27);
new NeoPixelBus<NeoGrbwFeature, NeoSk6812Method>(500, LEDGPIO);
#endif
strip_RGBW->Begin();
}
Expand All @@ -176,9 +177,8 @@ void ClockWork::initLedStrip(uint8_t num) {
#ifdef ESP8266
strip_RGB = new NeoPixelBus<NeoMultiFeature, Neo800KbpsMethod>(500);
#elif defined(ESP32)
strip_RGB =
new NeoPixelBus<NeoMultiFeature, NeoEsp32I2s1X8Ws2812xMethod>(
500, 27);
strip_RGB = new NeoPixelBus<NeoMultiFeature, NeoWs2812xMethod>(
500, LEDGPIO);
#endif
strip_RGB->Begin();
}
Expand Down
22 changes: 22 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand Down
4 changes: 2 additions & 2 deletions src/Wortuhr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ iUhrType *usedUhrType = nullptr;
NeoPixelBus<NeoMultiFeature, Neo800KbpsMethod> *strip_RGB = NULL;
NeoPixelBus<NeoGrbwFeature, Neo800KbpsMethod> *strip_RGBW = NULL;
#elif defined(ESP32)
NeoPixelBus<NeoGrbwFeature, NeoEsp32I2s1X8Sk6812Method> *strip_RGBW = NULL;
NeoPixelBus<NeoMultiFeature, NeoEsp32I2s1X8Ws2812xMethod> *strip_RGB = NULL;
NeoPixelBus<NeoGrbwFeature, NeoSk6812Method> *strip_RGBW = NULL;
NeoPixelBus<NeoMultiFeature, NeoWs2812xMethod> *strip_RGB = NULL;
#endif

WiFiClient client;
Expand Down

0 comments on commit 063cf74

Please sign in to comment.