Use FastLED instead of NeoMatrix.

This commit is contained in:
2024-07-21 19:26:56 +02:00
parent e1df24633a
commit f53f557a6a
4 changed files with 149 additions and 128 deletions

View File

@@ -16,7 +16,7 @@
#define HTTP_PORT (80) // Standard HTTP port
// ESP8266 Pins
#define NEOPIXEL_PIN (14) // pin to which the NeoPixels are attached
#define FASTLED_PIN (14) // pin to which the LEDs are attached
#define BUTTON_PIN (5) // pin to which the button is attached
// Time limits
@@ -36,8 +36,8 @@
#define PERIOD_ANIMATION_US (200 * 1000) // 200ms
#define PERIOD_CLOCK_UPDATE_US (1 * 1000 * 1000) // Must be 1s! Do not change!
#define PERIOD_HEARTBEAT_US (1 * 1000 * 1000) // 1s
#define PERIOD_MATRIX_UPDATE_US (100 * 1000) // 100ms
#define PERIOD_NIGHTMODE_CHECK_US (20 * 1000 * 1000) // 20s
#define PERIOD_MATRIX_UPDATE_US (33 * 1000) // 33ms
#define PERIOD_NIGHTMODE_CHECK_US (30 * 1000 * 1000) // 30s
#define PERIOD_TIME_UPDATE_US (1 * 1000 * 1000) // 1000ms
#define PERIOD_PONG_US (10 * 1000) // 10ms
#define PERIOD_SNAKE_US (50 * 1000) // 50ms
@@ -63,10 +63,12 @@
// Number of colors in colors array
#define NUM_COLORS (7)
#define COLOR_ORDER GRB // WS2812B color order
// LED matrix size
#define MATRIX_WIDTH (11)
#define MATRIX_HEIGHT (11)
#define NUM_MATRIX (MATRIX_WIDTH * (MATRIX_HEIGHT + 1))
// NTP macros
#define BUILD_YEAR (__DATE__ + 7) // Will expand to current year at compile time as string.