From 0e67d382d4eaec9ca9782f13eb2745f8c4c4f59f Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Tue, 19 Mar 2013 15:51:02 +0200 Subject: Add MidiEcho example. --- examples/Empty/Empty.ino | 9 +++++++++ examples/MidiEcho/MidiEcho.ino | 20 ++++++++++++++++++++ examples/empty/empty.ino | 9 --------- verify.sh | 4 +++- 4 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 examples/Empty/Empty.ino create mode 100644 examples/MidiEcho/MidiEcho.ino delete mode 100644 examples/empty/empty.ino diff --git a/examples/Empty/Empty.ino b/examples/Empty/Empty.ino new file mode 100644 index 0000000..f93cce6 --- /dev/null +++ b/examples/Empty/Empty.ino @@ -0,0 +1,9 @@ + +void setup() { + +} + +void loop() { + +} + 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/examples/empty/empty.ino b/examples/empty/empty.ino deleted file mode 100644 index f93cce6..0000000 --- a/examples/empty/empty.ino +++ /dev/null @@ -1,9 +0,0 @@ - -void setup() { - -} - -void loop() { - -} - 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" -- cgit v1.2.3