How to change which serial port MIDI.h uses?

Ho can I ensure that the program I use will connect to MIDI via serial1 on a MEGA 2560, so that I am free to debug via serial0?

The MIDI.h I use, seems to be the standard (if such a thing exists) with Arduino IDE:

 *  @file       MIDI.h
 *  Project     Arduino MIDI Library
 *  @brief      MIDI Library for the Arduino
 *  @author     Francois Best, lathoub
 *  @date       24/02/11
 *  @license    MIT - Copyright (c) 2015 Francois Best

This is the header from it.

Stab in the dark here. Take a look at the library's "CustomBaudRate.ino" example. Try replacing "Serial" with "Serial1":

#else
    MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings> serialMIDI(Serial);
    MIDI_NAMESPACE::MidiInterface<MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>> MIDI((MIDI_NAMESPACE::SerialMIDI<HardwareSerial, CustomBaudRateSettings>&)serialMIDI);
#endif

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.