diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-24 15:51:00 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-24 15:51:00 +0200 |
commit | 637ec19bc55a2466fb0ffbf310140f891ac06783 (patch) | |
tree | 94c8dfe91ea47af66a57e0bafd54688056eddecd /puzzle | |
parent | 0cc8bf80982cacebb3b8b5ed73f766410c5c5b9c (diff) |
do not use hard-coded neotrellis module addresses
Diffstat (limited to 'puzzle')
-rw-r--r-- | puzzle/neo/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/puzzle/neo/main.cpp b/puzzle/neo/main.cpp index ece4e9b..831f97e 100644 --- a/puzzle/neo/main.cpp +++ b/puzzle/neo/main.cpp @@ -1,8 +1,9 @@ #include <Arduino.h> #include <Wire.h> #include <Adafruit_NeoTrellis.h> -#include "lib/pbdrv/pb-types.h" -#include "lib/pbdrv/pb-mod.h" +#include "pb-types.h" +#include "pb-mod.h" +#include "pb.h" #define MATRIX_SIZE 8 #define LED_COLOR_ON 0x0000FF // Color of the LEDs in ON state @@ -11,15 +12,14 @@ #define LED_COLOR_ORANGE 0xFFA500 // Orange color for IDLE state Adafruit_NeoTrellis t_array[MATRIX_SIZE / 4][MATRIX_SIZE / 4] = { - {Adafruit_NeoTrellis(0x2E), Adafruit_NeoTrellis(0x2F)}, - {Adafruit_NeoTrellis(0x30), Adafruit_NeoTrellis(0x32)} + { Adafruit_NeoTrellis(PB_ADDR_ADA_NEO_1), Adafruit_NeoTrellis(PB_ADDR_ADA_NEO_2) }, + { Adafruit_NeoTrellis(PB_ADDR_ADA_NEO_3), Adafruit_NeoTrellis(PB_ADDR_ADA_NEO_4) }, }; Adafruit_MultiTrellis trellis((Adafruit_NeoTrellis *)t_array, MATRIX_SIZE / 4, MATRIX_SIZE / 4); bool neoMatrix[MATRIX_SIZE][MATRIX_SIZE]; // To track state of each pixel - unsigned long previousMillis = 0; const long interval = 500; // Interval at which to blink (milliseconds) |