Print a message to a custom LED matrix and play a song on a piezo buzzer.

Dependencies:   Adafruit_32x8matrix

Files at this revision

API Documentation at this revision

Comitter:
maclobdell
Date:
Thu Dec 15 17:43:32 2016 +0000
Child:
1:dd1d1b64b9a5
Commit message:
Example application for 16x8 Adafruit LED Backpack.

Changed in this revision

Adafruit_LEDBackpack.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Adafruit_LEDBackpack.lib	Thu Dec 15 17:43:32 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/maclobdell/code/Adafruit_LEDBackpack/#529bad55777e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 15 17:43:32 2016 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "Adafruit_LEDBackpack.h"
+#include "Adafruit_GFX.h"
+ 
+I2C i2c(D14, D15);
+ 
+Adafruit_16x8matrix matrix = Adafruit_16x8matrix(&i2c);
+ 
+int main() {
+    matrix.begin(0x70);
+    while(1) {
+        matrix.clear();
+        for (int i = 0; i < 16; i++) {
+          for (int j = 0; j < 16; j++) {
+              matrix.drawPixel(i, j, LED_ON);  
+              matrix.writeDisplay();  // write the changes we just made to the display
+              Thread::wait(100);
+          }
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Thu Dec 15 17:43:32 2016 +0000
@@ -0,0 +1,1 @@
+https://github.com/armmbed/mbed-os/#532da7133f7d51db958eacb2b5f13e7cf7feb81f