[HELP] Arduino Midi Library - Program Change

Hi!

I'm testing the MIDI Library for Arduino v3.2.

I've written this simple code to send Program Change messages thru a Midi Device (Its setup is correct)

#include <MIDI.h>

void setup(){
MIDI.begin();
}

void loop(){

for (int i=0; i<10; i++){

MIDI.sendProgramChange(i,1);
delay (1000);
}
}

When I run Arduino the tx port works (led is on whenever midi message goes out) but the device reads only the first midi message.

How can I solve the problem?

Regards

How can I solve the problem?

Perhaps by not assuming that the mysterious device that you are sending data to IS set up correctly. I see nothing in that code that looks wrong. If the TX light flashes once per second, the Arduino IS sending data. It would appear, then, that the problem is on the receiving end.

thanks for your reply.

I've tried with this code:

#include <MIDI.h>

void setup(){
MIDI.begin();
}

void loop(){

for (int i=0; i<10; i++){

MIDI.sendProgramChange(i,1);
MIDI.sendControlChange(0,0,1);
delay (1000);
}
}

I've added this command: MIDI.sendControlChange(0,0,1) and all works ok.

I can write any send command and it works.

I don't understand why. I've checked settings of Midi Device and they seems to be ok...

Hi, I need help with code.
I am new to coding, in fact know nothing about coding.

I want to build midi program change device which can send midi message to keyboard for program change.

My post with all details and agenda.

https://forum.arduino.cc/index.php?topic=689400.0

PLEASE PLEASE HELP.