Libraries conflict when used together

Hello guys,
I'm trying to get MIDI and PS2 keyboard input on a Xiao rp2040 using two libraries:
GitHub - FortySevenEffects/arduino_midi_library: MIDI for Arduino for the MIDI
GitHub - techpaul/PS2KeyAdvanced: Arduino PS2 Keyboard FULL keyboard protocol support and full keys to integer coding for the PS2 input

The libraries work when not used at the same time

The problem is when they are running together the PS2 input is garbage, it logs the press, but the code of the key pressed is always FF

What I don't understand is MIDI and PS2 inputs are on different pins, so why they affect each other ?

hey, i have a questionn, do you use diffrent pins on arduino or using breadboard?

I'm using a breadboard

IIRC, attachInterrupt is broken on the RP2040. I've never found the time to investigate further, though.

Hmm, ok but PS2 work when used alone without the MIDI library

Found the solution
Was trying to get PS2 Data on TX pin but MIDI library set TX pin for MidiThru, deactivate midithru let the pin available for other things

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.