aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Kistner <ralf.kistner@gmail.com>2013-03-19 15:51:02 +0200
committerRalf Kistner <ralf.kistner@gmail.com>2013-03-19 15:51:02 +0200
commit0e67d382d4eaec9ca9782f13eb2745f8c4c4f59f (patch)
tree2c9cd9237237c92964f9f6aee85f77bf859cfec2
parent2c7a56e052f7dd2b47fc17d4ea22359237eb5ea7 (diff)
Add MidiEcho example.
-rw-r--r--examples/Empty/Empty.ino (renamed from examples/empty/empty.ino)0
-rw-r--r--examples/MidiEcho/MidiEcho.ino20
-rwxr-xr-xverify.sh4
3 files changed, 23 insertions, 1 deletions
diff --git a/examples/empty/empty.ino b/examples/Empty/Empty.ino
index f93cce6..f93cce6 100644
--- a/examples/empty/empty.ino
+++ b/examples/Empty/Empty.ino
diff --git a/examples/MidiEcho/MidiEcho.ino b/examples/MidiEcho/MidiEcho.ino
new file mode 100644
index 0000000..4d4e17e
--- /dev/null
+++ b/examples/MidiEcho/MidiEcho.ino
@@ -0,0 +1,20 @@
+
+void setup() {
+
+}
+
+void loop() {
+ while(MIDIUSB.available() > 0) {
+ MIDIEvent e;
+ e = MIDIUSB.read();
+ MIDIUSB.write(e);
+ MIDIUSB.flush();
+ // Example messages:
+ // Note on, channel 0, middle C (48), normal velocity (64):
+ // e = {0x09, 0x90, 48, 64}
+ // Note off, channel 2, middle C, fastest velocity (127):
+ // e = {0x08, 0x82, 48, 127}
+ }
+}
+
+
diff --git a/verify.sh b/verify.sh
index 548971f..1af41c0 100755
--- a/verify.sh
+++ b/verify.sh
@@ -12,10 +12,12 @@ function example {
echo "Using $ARDUINO_PATH/arduino"
cd $ARDUINO_PATH
xvfb-run ./arduino --board arcore:avr:leonardo --verify "$EXAMPLES/$1/$1.ino"
+ sleep 1
else
echo "Set $ARDUINO_PATH to the folder containing the arduino binary"
fi
}
-example "empty"
+example "Empty"
+example "MidiEcho"