Datasheet
NeoMatrix Library
The Adafruit_NeoMatrix library builds upon Adafruit_NeoPixel to create two-dimensional graphic displays using
NeoPixels. You can then easily draw shapes, text and animation without having to calculate every X/Y pixel position.
Small NeoPixel matrices are available in the shop. Larger displays can be formed using sections of NeoPixel strip, as
shown in the photo above.
In addition to the Adafruit_NeoPixel library (which was already downloaded and installed in a prior step), NeoMatrix
requires two additional libraries:
1. Adafruit_NeoMatrix
2. Adafruit_GFX
If you’ve previously used any Adafruit LCD or OLED displays, you might already have the latter library installed.
Installation for both is similar to Adafruit_NeoPixel before: unzip, make sure the folder name matches the .cpp and .h
files within, then move to your Arduino libraries folder and restart the IDE.
Arduino sketches need to include all three headers just to use this library:
Layouts
Adafruit_NeoMatrix uses exactly the same coordinate system, color functions and graphics commands as the
Adafruit_GFX library. If you’re new to the latter, a separate tutorial explains its use. There are also example sketches
included with the Adafruit_NeoMatrix library.
We’ll just focus on the
constructor
here — how to declare a two-dimensional display made from NeoPixels. Powering
the beast is another matter, covered on the prior page.
The library handles both
single
matrices — all NeoPixels in a single uniform grid — and
tiled
matrices — multiple grids
combined into a larger display:
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
© Adafruit Industries https://learn.adafruit.com/adafruit-neopixel-uberguide Page 47 of 68