I'm running the following program on a Teensy LC, which based on examples should be sending "hairless midi" at 115200 baud out the default serial port. However my other device which I know can receive midi at 115200 baud fails to receive it. Looking at the the output on my scope and analyzing the timing of the bit transitions, I can see that the baud is almost exactly 31250 baud, so I assume that for some reason "MySettings" is not changing the baud rate from the default. What could the problem be? I'm running a recent version of the MIDI library installed through Visual Micro.
#include <MIDI.h>
#include <midi_Defs.h>
#include <midi_Message.h>
#include <midi_Namespace.h>
#include <midi_Settings.h>
struct MySettings : public midi :: DefaultSettings {
static const long BaudRate = 115200;
static const unsigned SysExMaxSize = 128;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, MySettings)
void setup()
{
MIDI.begin();
}
void loop()
{
MIDI.sendNoteOn( 42, 85, 1);
delay(2);
MIDI.sendNoteOff(42, 85, 1);
delay(4);
}
#include <MIDI.h>
#include <midi_Defs.h>
#include <midi_Message.h>
#include <midi_Namespace.h>
#include <midi_Settings.h>
struct MySettings : public midi :: DefaultSettings {
static const long BaudRate = 115200;
static const unsigned SysExMaxSize = 128;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, MIDI, MySettings)
void setup()
{
MIDI.begin();
}
void loop()
{
MIDI.sendNoteOn( 42, 85, 1);
delay(2);
MIDI.sendNoteOff(42, 85, 1);
delay(4);
}