Teensy 4.1 MIDI out on Serial2 doesn't work

Status
Not open for further replies.

DragonSF

Well-known member
I tried to get this code working:
Code:
#include <MIDI.h>

MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
const int channel = 1;

void setup() {
  MIDI.begin();
}

void loop() {
  int note;
  for (note=10; note <= 127; note++) {
    MIDI.sendNoteOn(note, 100, 2);
    delay(200);
    MIDI.sendNoteOff(note, 100, 2);
  }
  delay(2000);
}
If I use usbMIDI, everything works fine, but not on Serial2: The Midi connector is connected to pin 8 (TX2) via 47 R, GND and VCC via 47R. There are no short-circuits (anymore) and there is activity on the output. But the signal is not recognized by the MIDI receiver (I tried 3 different ones).I also checked, that the DIN connector is correctly wired. Any ideas?
 
Last edited:
I ran it here on a Teensy 4.1. This is what my oscilloscope sees on pin 8.

file.png
 
Status
Not open for further replies.
Back
Top