my midi test

Dependencies:   USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
kb10uy
Date:
Sun Dec 28 12:06:50 2014 +0000
Parent:
0:4fc8ef3908b1
Commit message:
add includes

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 4fc8ef3908b1 -r a17d202e9a68 main.cpp
--- a/main.cpp	Sun Dec 28 12:04:32 2014 +0000
+++ b/main.cpp	Sun Dec 28 12:06:50 2014 +0000
@@ -1,11 +1,13 @@
 #include "mbed.h"
 #include "USBMIDI.h"
+//#include <string>
+//#include <sstream>
 
 DigitalOut myled(LED1);
 USBMIDI midi;
 
 /*string str;*/
-bool val = false;
+bool valid = false;
 
 void mm(MIDIMessage m) {
     //ostringstream os;
@@ -34,8 +36,8 @@
 int main() {
     midi.attach(&mm);
     while(1) {
-        if (val) {
-            val=!val;
+        if (valid) {
+            valid=false;
             //printf("%s\r\n",/*str.c_str()*/);
         }
         wait_ms(1);