Hey eh, i loaded the standard MIDI.h dual-merger onto my UNO, I have a standard midi-shield setup on my breadboard using a 6N136 with a 10K pullup on pin 6 for the input, and a 7404 with 2x 220R on the output. Anyway this is a tested schematic, the hardware midi-thru works ! Not only that, software midi-thru works, but only if use the swSerial RX-pin. Both TX-outputs work, but the hardwareSerial input is not working ?! I am truly puzzled. Not only does it not work, but connecting stops hardware midi-thru from working as if there is some form of interference. Is there something about that UART that i need to know (and don't) ? Or is possibly just broken ? but then why do al other uses of that pin still work as expected ?
The sketch (for completions sake)
#include <MIDI.h>
#include <SoftwareSerial.h>
SoftwareSerial softSerial(2, 3);
MIDI_CREATE_INSTANCE(HardwareSerial, Serial, midiA);
MIDI_CREATE_INSTANCE(SoftwareSerial, softSerial, midiB);
void setup()
{
// Initiate MIDI communications, listen to all channels
midiA.begin(MIDI_CHANNEL_OMNI);
midiB.begin(MIDI_CHANNEL_OMNI);
}
void loop()
{
if (midiA.read())
{
// Thru on A has already pushed the input message to out A.
// Forward the message to out B as well.
midiB.send(midiA.getType(),
midiA.getData1(),
midiA.getData2(),
midiA.getChannel());
}
if (midiB.read())
{
// Thru on B has already pushed the input message to out B.
// Forward the message to out A as well.
midiA.send(midiB.getType(),
midiB.getData1(),
midiB.getData2(),
midiB.getChannel());
}
}
and the schematic (as said i am using a 6N136)
I am not sure if i had this issue before with my UNO, normally i would grab a pro-mini, but i didn't have one with header pins already soldered on, and normally i use the UNO to upload to other boards, for which it works just fine.
