From 1b07c426d1954d87b6f8a11094b4651017115942 Mon Sep 17 00:00:00 2001 From: Andreas Wilms Date: Sat, 15 Feb 2020 18:10:20 +0100 Subject: [PATCH 1/2] added .vscode --- .gitignore | 1 + platformio.ini | 1 + src/main.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 03f4a3c..b9f3806 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .pio +.vscode diff --git a/platformio.ini b/platformio.ini index dda5b7d..47b5a8a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,4 +17,5 @@ board_build.mcu = esp8266 ; change MCU frequency board_build.f_cpu = 80000000L upload_protocol = esptool +lib_deps = WS2812FX diff --git a/src/main.cpp b/src/main.cpp index d4c050f..7061431 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,7 @@ void setup() { ws2812fx.setBrightness(255); // Set the animation speed. 10=very fast, 5000=very slow - ws2812fx.setSpeed(1000); + ws2812fx.setSpeed(5000); // Set the color of the LEDs ws2812fx.setColor(WHITE); @@ -33,7 +33,7 @@ void setup() { // Select an animation effect/mode. 0=static color, 1=blink, etc. You // can specify a number here, or there some handy keywords defined in // the WS2812FX.h file that are more descriptive and easier to remember. - ws2812fx.setMode(FX_MODE_TWINKLE_FADE); + ws2812fx.setMode(FX_MODE_RAINBOW_CYCLE); // Start the animation ws2812fx.start(); From 7ab5be7997a83e088d7507cf944763799e71cd42 Mon Sep 17 00:00:00 2001 From: Andreas Wilms Date: Sat, 15 Feb 2020 22:27:15 +0100 Subject: [PATCH 2/2] Disabled WiFI --- platformio.ini | 5 +++-- src/main.cpp | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index 47b5a8a..decf26d 100644 --- a/platformio.ini +++ b/platformio.ini @@ -17,5 +17,6 @@ board_build.mcu = esp8266 ; change MCU frequency board_build.f_cpu = 80000000L upload_protocol = esptool -lib_deps = WS2812FX - +lib_deps = + WS2812FX + JustWifi diff --git a/src/main.cpp b/src/main.cpp index 7061431..0d47c98 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include +#include #define LED_COUNT 60 #define LED_PIN 12 @@ -19,7 +20,12 @@ unsigned long last_change = 0; unsigned long now = 0; void setup() { - ws2812fx.init(); + + WiFi.mode(WIFI_OFF); + WiFi.forceSleepBegin(); + delay(1); + + ws2812fx.init(); // Set the LED’s overall brightness. 0=strip off, 255=strip at full intensity ws2812fx.setBrightness(255);