From 11c3ada47c1b236e64da1cf4d36cfcf690a02ec1 Mon Sep 17 00:00:00 2001 From: Francois Best Date: Thu, 25 Oct 2012 16:32:32 +0200 Subject: [PATCH] Using Serial1 for Leonardo. --- src/midi_Settings.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/midi_Settings.h b/src/midi_Settings.h index 7345844..0bb5869 100644 --- a/src/midi_Settings.h +++ b/src/midi_Settings.h @@ -50,8 +50,12 @@ // Set the default port to use for MIDI. #if MIDI_AUTO_INSTANCIATE # ifdef ARDUINO -# define MIDI_DEFAULT_SERIAL_PORT Serial -# define MIDI_DEFAULT_SERIAL_CLASS HardwareSerial +# ifdef USBCON +# define MIDI_DEFAULT_SERIAL_PORT Serial1 // For Leonardo +# else +# define MIDI_DEFAULT_SERIAL_PORT Serial // For other Arduinos +# endif +# define MIDI_DEFAULT_SERIAL_CLASS HardwareSerial # include "Arduino.h" # include "HardwareSerial.h" # else