Example application for two 16x8 Adafruit LED Backpacks to make a 32 x 8 matrix.

Dependencies:   Adafruit_32x8matrix

Fork of Adafruit_LEDBackpack_16x8_App by Mac Lobdell

/media/uploads/maclobdell/austin_iot_lab.jpg

This project uses two 16x8 1.2" LED Matrix + Backpacks stuck together to make a 32x8 double-length matrix.

Committer:
maclobdell
Date:
Thu Dec 15 17:43:32 2016 +0000
Revision:
0:2eec8a9428ea
Child:
1:dd1d1b64b9a5
Example application for 16x8 Adafruit LED Backpack.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
maclobdell 0:2eec8a9428ea 1 #include "mbed.h"
maclobdell 0:2eec8a9428ea 2 #include "Adafruit_LEDBackpack.h"
maclobdell 0:2eec8a9428ea 3 #include "Adafruit_GFX.h"
maclobdell 0:2eec8a9428ea 4
maclobdell 0:2eec8a9428ea 5 I2C i2c(D14, D15);
maclobdell 0:2eec8a9428ea 6
maclobdell 0:2eec8a9428ea 7 Adafruit_16x8matrix matrix = Adafruit_16x8matrix(&i2c);
maclobdell 0:2eec8a9428ea 8
maclobdell 0:2eec8a9428ea 9 int main() {
maclobdell 0:2eec8a9428ea 10 matrix.begin(0x70);
maclobdell 0:2eec8a9428ea 11 while(1) {
maclobdell 0:2eec8a9428ea 12 matrix.clear();
maclobdell 0:2eec8a9428ea 13 for (int i = 0; i < 16; i++) {
maclobdell 0:2eec8a9428ea 14 for (int j = 0; j < 16; j++) {
maclobdell 0:2eec8a9428ea 15 matrix.drawPixel(i, j, LED_ON);
maclobdell 0:2eec8a9428ea 16 matrix.writeDisplay(); // write the changes we just made to the display
maclobdell 0:2eec8a9428ea 17 Thread::wait(100);
maclobdell 0:2eec8a9428ea 18 }
maclobdell 0:2eec8a9428ea 19 }
maclobdell 0:2eec8a9428ea 20 }
maclobdell 0:2eec8a9428ea 21 }