cleanup
This commit is contained in:
parent
c43d92d649
commit
3db2424fc9
|
|
@ -1,28 +1,17 @@
|
||||||
#include <MIDI.h>
|
#include <MIDI.h>
|
||||||
|
|
||||||
// Simple tutorial on how to receive and send MIDI messages.
|
// Before running the program below, make sure you set
|
||||||
// Here, when receiving any message on channel 4, the Arduino
|
// UseReceiverActiveSensing (optionally UseSenderActiveSensing) in Settings.h to true
|
||||||
// will blink a led and play back a note for 1 second.
|
|
||||||
|
|
||||||
MIDI_CREATE_DEFAULT_INSTANCE();
|
MIDI_CREATE_DEFAULT_INSTANCE();
|
||||||
USING_NAMESPACE_MIDI
|
|
||||||
|
|
||||||
void handleError(int8_t err)
|
void handleError(int8_t err)
|
||||||
{
|
{
|
||||||
if (bitRead(err, ErrorActiveSensingTimeout))
|
|
||||||
Serial.println("ActiveSensing Timeout");
|
|
||||||
else
|
|
||||||
Serial.println("ActiveSensing OK");
|
|
||||||
|
|
||||||
digitalWrite(LED_BUILTIN, (err == 0)? LOW : HIGH);
|
digitalWrite(LED_BUILTIN, (err == 0)? LOW : HIGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
Serial.begin(115200);
|
|
||||||
while (!Serial) {}
|
|
||||||
Serial.println("booting");
|
|
||||||
|
|
||||||
pinMode(LED_BUILTIN, OUTPUT);
|
pinMode(LED_BUILTIN, OUTPUT);
|
||||||
digitalWrite(LED_BUILTIN, LOW);
|
digitalWrite(LED_BUILTIN, LOW);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue