Hi, I'm using both an ESP32 WROOM 32 and an ESP32-S3-DevKitC-1 to create a MIDI controller with Arduino.
The code I'm using is the one below, I'm using the same type of connections (https://user-images.githubusercontent.c ... 01db0f.png) and pin 17 on both boards but it works only on the WROOM32, do you know why?
Thank you.
#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);
}
MIDI on Serial2 not working on ESP32-S3-DevKitC-1
Re: MIDI on Serial2 not working on ESP32-S3-DevKitC-1
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
Code: Select all
#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");
}
Re: MIDI on Serial2 not working on ESP32-S3-DevKitC-1
Using Serial 1 and 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 on Serial2.
Thanks for your help
Thanks for your help
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 95 guests