To talk to the LED helper chip you'll need to use our Arduino Adafruit LED Backpack library from github.
To download you can visit the repository, or simply click on this button:
Rename the uncompressed folder Adafruit_LEDBackpack. Check that the Adafruit_LEDBackpack folder contains Adafruit_LEDBackpack.cpp and Adafruit_LEDBackpack.h Place the Adafruit_LEDBackpack library folder your arduinosketchfolder/libraries/ folder.
You may need to create the libraries subfolder if it's your first library. We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Install Adafruit GFX
You will need to do the same for the Adafruit_GFX library available here
Rename the uncompressed folder Adafruit_GFX and check that the Adafruit_GFX folder contains Adafruit_GFX.cpp and Adafruit_GFX.h
Place the Adafruit_GFX library folder your arduinosketchfolder/libraries/ folder like you did with the LED Backpack library
If using an older version of the Arduino IDE (pre-1.8.10), also locate and install the Adafruit_BusIO library (newer versions do this automatically when using the Arduino Library Manager).
Run Test!
Once you've restarted you should be able to select the File->Examples->Adafruit_LEDBackpack->minimatrix16x8 example sketch. Upload it to your Feather as usual. You should see a basic test program that goes through a bunch of different routines.
Upload to your Arduino, and open up the Serial console at 9600 baud speed. You'll see a little light show demonstrating bitmaps, drawing lines, circles and squares, text scrolling and more!
Library Reference
For the 16x8 displays, our library essentially treats it like a grpahical display with 128 pixels
Setup
You can create the object with
Adafruit_8x16minimatrix matrix = Adafruit_8x16minimatrix();
There's no arguments or pins because the backpacks use the fixed I2C pins.
By default, the address is 0x70, but you can pass in the I2C address used when you initialize the display with begin
matrix.begin(0x70); // pass in the address
Drawing with Adafruit GFX
Once you're happy that the matrix works, you can write your own sketches. The 16x8 matrix supports everything the Adafruit GFX library - drawing pixels, lines, rectangles, circles, triangles, roundrects, and small bitmaps. For more details check out the GFX page which will detail all of the GFX routines.
matrix.writeDisplay();
That's what actually 'sets' the data onto the LEDs!
Other things!
- setBrightness(brightness)- will let you change the overall brightness of the entire display. 0 is least bright, 15 is brightest and is what is initialized by the display when you start
- blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display blinking.
Text editor powered by tinymce.