Reply To: RGB LED array driver

Forums Forums Xcelerator Blocks RGB LED array driver Reply To: RGB LED array driver

#2281
ForceTronic
Participant

Hello, for your XLR8NeoPixel.h library on GitHub in the comments you state how to use your XLR8NeoPixel library in place of the Adafruit_NeoPixel.h library so users can still use higher level Adafruit libraries like Adafruit_GFX and Adafruit_NeoMatrix. I tried using the process you explain (see my simple code below), but I get the following compile error

“Arduino: 1.8.3 (Windows 10), Board: “XLR8 Snō, 16MHz Standard (Float,Servo,NeoPixel) r2141”

C:\Users\xxxxxx\AppData\Local\Temp\cclrXxvX.ltrans0.ltrans.o: In function `__static_initialization_and_destruction_0′:

C:\Users\xxxx\Dropbox\matrixTest/matrixTest.ino:41: undefined reference to `Adafruit_NeoMatrix::Adafruit_NeoMatrix(int, int, unsigned char, unsigned char, unsigned char)’

collect2.exe: error: ld returned 1 exit status

It seems like the compiler does not recognize my declaration of an NeoMatrix object, any ideas what might be the issue? Any help is appreciated.

//*************************** code causing compile error***************************
#include <XLR8NeoPixel.h>
#define Adafruit_NeoPixel XLR8NeoPixel
#define ADAFRUIT_NEOPIXEL_H
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>

Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(8, 8, PIN,
NEO_MATRIX_TOP + NEO_MATRIX_RIGHT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_PROGRESSIVE,
NEO_GRB + NEO_KHZ800);

void setup() {

}

void loop() {
}