Hello everyone,
I've spent quite sometime studying the codes of Pedalino Mini project on Github, trying to learn(steal) some features from it but it just didn't work as I wished. I would like to connect D18 and D19 to a Pro Micro which acts as USB Host and D4 and D15 to DIN-5 ports for physical Midi IN OUT (Yeah, just like the schematics of Pedalino Mini), but I get nothing at all on those pins
#include <Arduino.h>
#include <MIDI.h>
#include <esp_now.h>
struct Serial1MIDISettings : public midi::DefaultSettings
{
static const long BaudRate = 31250;
static const int8_t RxPin = 18;
static const int8_t TxPin = 19;
};
struct Serial2MIDISettings : public midi::DefaultSettings
{
static const long BaudRate = 31250;
static const int8_t RxPin = 15;
static const int8_t TxPin = 4;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial1, USB_MIDI, Serial1MIDISettings);
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial2, DIN_MIDI, Serial2MIDISettings);
void setup() {
USB_MIDI.begin(MIDI_CHANNEL_OMNI);
DIN_MIDI.begin(MIDI_CHANNEL_OMNI);
}
void loop() {
// DIN_MIDI.read();
DIN_MIDI.sendNoteOn(60, 127, 1);
delay(100);
DIN_MIDI.sendNoteOff(60, 0, 1);
delay(100);
USB_MIDI.sendNoteOn(60, 127, 1);
delay(100);
USB_MIDI.sendNoteOff(60, 0, 1);
delay(100);
}
I have also tried using:
MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
with the ESP32 which does give me Midi In on Pin16 but no output at all on Pin 17. I have tested the Midi In out circuit, as well as all cables with Arduino Nano and they are fine. Anyone knows how to make it work? Thank you so much