ESP32 Midi + Serial2

Looking for guidence using the Serial2 on an ESP32. I am trying to send MIDI via the serial2 port (dedicated UART). As soon as I start the port


it pulls the TX pin high and it stays high. I am using the standard TX2 pin for testing. I am using a MELIFE ESP-32S. I have similar code working with my Uno, but wanted to use the dedicated UART (and WiFi) of the ESP32.

#include <MIDI.h>

MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, DIN_MIDI);
int LED_BUILTIN = 2;
void setup() {

void loop() {

  // Send note 42 with velocity 127 on channel 1
  DIN_MIDI.sendNoteOn(42, 127, 1);
  // Read incoming messages;


Turns out I was connected to 5 Volt pin (driven by USB) and not the 3.3 volt so the serial was not working. properly.... It is now working for MIDI sending via 3.3 volt, next I will try adding the midi receiving. I am using 10 & 33 ohm resistors.