Arduino MIDI Program Change

Hi, very good to all. Given the title I try to connect an Arduino Mega a USB MIDI device (of which have 3 USB cables, INPUT, OUTPUT) to switch instruments in KONTAKT and to raise volume and some commands. The Arduino Mega is connected by the serial port with the midi connector by 5V, TX1, GND according to schemes I found on the internet.

Here the problem arises with what happens is that I have the LINUX and Windows operating systems, the connection programming in LINUX and with the LINUX MIDISNOOP program to read the files sent by the device in the USB MIDI device, in this case a Program Change and Volume cycle.

Once tested in LINUX I pass it to WINDOWS by connecting it in the same way and it does not recognize any command on the Windows MIDI monitor (MIDI-OX) but it works with other MIDI devices (keyboard), much less on the KONTAKT. That is my question that I did wrong to work in LINUX but not in WINDOWS if the MIDI protocol is the same on any platform.

Here is the MIDI command cycle that sends 2 Program Change and 2 Volume:

void setup() {
Serial1.begin(32150);
}

void loop() {
Serial1.write(0xC1);
Serial1.write(45);
delay(1000);
Serial1.write(0xB1);
Serial1.write(7);
Serial1.write(120);
delay(1000);
Serial1.write(0xC1);
Serial1.write(66);
delay(1000);
Serial1.write(0xB1);
Serial1.write(7);
Serial1.write(80);
delay(1000);
}

the MIDI protocol is the same on any platform.

That is correct.
However you are forgetting that Windows is crap.

You are also forgetting to read the how to use this forum sticky post which tells you things like how to post code and not to cross post.