Hello, I’m trying to make a Input circuit using the RP2040.
I have done a similar circuit with the Arduino UNO, and the controller was able to receive midi messages.
I need 5V for MIDI. So i use the GND and VSYS pins to get 5 Volts. Then I’ve tried different Pins. Like GP0, GP1, … Theoretically i need a RX pin for this. I thought GP0 would be standard. Maybe the problem is that i use the 5V from the VSYS. Maybe I’m mistaken or i need some extra configuration in the code. The Midi In circuit goes with an octocoupler and was working with an Arduino, there i was not describing it here.
I’m not sure why i dont receive any midi message. If i receive MIDI On message, it should turn on the LED. I’m glad for any help!
I use Arduino code via Platformio to upload it:
#include <Arduino.h>
#include <MIDI.h>
MIDI_CREATE_DEFAULT_INSTANCE();
const int ledPin = 25;
void respondOn(byte channel, byte number, byte velocity){
digitalWrite(ledPin, HIGH);
}
void respondOff(byte channel, byte number, byte velocity){
digitalWrite(ledPin, LOW);
}
void setup() {
pinMode(ledPin, OUTPUT);
MIDI.begin(MIDI_CHANNEL_OMNI);
MIDI.setHandleNoteOn(respondOn);
MIDI.setHandleNoteOff(respondOff);
}
void loop() {
MIDI.read();
}