Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIDI not working with ESP32 S3 with Serial2 #308

Open
mastrumisciu opened this issue Nov 18, 2022 · 3 comments
Open

MIDI not working with ESP32 S3 with Serial2 #308

mastrumisciu opened this issue Nov 18, 2022 · 3 comments
Labels

Comments

@mastrumisciu
Copy link

mastrumisciu commented Nov 18, 2022

Hi I'm using both an ESP32 WROOM 32 and a ESP32-S3-DevKitC-1 for some MIDI projects with Arduino.
The code I'm using is the one below and for both board I'm using the following wiring to the 5 din connector and using resistors for 3,3volt.
https://eu-central-1-02860049-view.menlosecurity.com/c/0/i/aHR0cHM6Ly93d3cubWlkaS5vcmcvaW1hZ2VzL3NwZWNzL1NjcmVlbl9TaG90XzIwMjAtMDctMThfYXRfMTIuMjAuMDhfUE0ucG5n

By using pin 17 as Tx I get the code working on the WROOM board only, I can upload the code with no errors on the S3 board as well but no MIDI message are sent from pin 17.
Is there anyone using the S3 for MIDI over Serial2 that can help me on `this?
Thanks!

``

#include <MIDI.h>
#include <HardwareSerial.h>
#include <esp_now.h>

struct Serial2MIDISettings : public midi::DefaultSettings
{
static const long BaudRate = 31250;
static const int8_t TxPin = 17;
};

MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial2, DIN_MIDI, Serial2MIDISettings);

void setup() {
Serial.begin(9600);
DIN_MIDI.begin(MIDI_CHANNEL_OMNI);
delay(300);
DIN_MIDI.setHandleProgramChange(handleProgramChange);
}

void loop() {
DIN_MIDI.sendProgramChange(42, 10);
delay(100);
}

``

  • What board are you using ?
    • ESP32wroom and ESP32 S3 Devkit
  • What version of the Arduino IDE are you using ?
    • 1.8.5
  • How are you using MIDI ?
    • DIN plug
  • Is your problem related to:
    • MIDI Output (sending messages to other devices)
  • How comfortable are you with code ?
    • I've done basic projects

Describe your project and what you expect to happen:

I just need to send some basic MIDI messages from S3 to a MIDI device using 5pin DIN connector using Serial2

Describe your problem (what does not work):

By using pin 17 as Tx I get the code working on the WROOM board only, I can upload the code with no errors on the S3 board as well but no MIDI message are sent from pin 17.

Steps to reproduce

The code I'm using is the one above and for both board I'm using the following wiring to the 5 din connector and using resistors for 3,3volt.
https://eu-central-1-02860049-view.menlosecurity.com/c/0/i/aHR0cHM6Ly93d3cubWlkaS5vcmcvaW1hZ2VzL3NwZWNzL1NjcmVlbl9TaG90XzIwMjAtMDctMThfYXRfMTIuMjAuMDhfUE0ucG5n

@mastrumisciu
Copy link
Author

I tried to simplify the code, see below, but again it works perfectly on the WROOM board and there's no message coming from the S3

``
#include <MIDI.h>
#include <HardwareSerial.h>
#include <esp_now.h>

MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, midi2)

void setup() {
Serial2.begin(31250);
midi2.begin(MIDI_CHANNEL_OMNI);
}

void loop() {
midi2.sendProgramChange(42, 10);
delay(100);
Serial.println("LOOP");
}
``

@mastrumisciu
Copy link
Author

Using Serial 1 and related pin 16 the code works on S3 board as well, I checked if the pin 17 of the dev kit board is connected to the esp3 s3 module pin and I confirm it is so I think there’s some bug in Serial2, Thanks for your help

@cyberdevnet
Copy link

I have a similar problem where I can only send and not receive, but if invert the wiring then I can receive but not send. Using Serial2 (RXD2 16, TXD2 17)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants