Real Time Lab Program

Dependencies:   USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
robt
Date:
Sun Jan 25 16:29:02 2015 +0000
Commit message:
Real Time Lab Program

Changed in this revision

USBDevice.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.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 8babbd3cdb4b USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Sun Jan 25 16:29:02 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#3b1c43ac045c
diff -r 000000000000 -r 8babbd3cdb4b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jan 25 16:29:02 2015 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "USBMIDI.h"
+
+USBMIDI midi;                        // initialise MIDI interface
+
+int i;
+
+int main() {             
+    while (1) {    
+        for(i=48; i<72; i++) {                     // step through notes 48 to 120
+            midi.write(MIDIMessage::NoteOn(i));    // note on
+            wait(0.2);                             // pause
+            midi.write(MIDIMessage::NoteOff(i));   // note off  
+            wait(0.2);                             // pause
+        }
+    }
+}
diff -r 000000000000 -r 8babbd3cdb4b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jan 25 16:29:02 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file