Leonardo - How to send MIDI Program Change messages with MIDIUSB library?

Read chapter 4 (pages 16-17) of the MIDI USB specification.

uint8_t m = 0xC0; // ProgramĀ  Change
uint8_t c = 0; // MIDI channel 1
uint8_t d1 = 19; // Church organ
uint8_t d2 = 0; // Unused for Program Change
midiEventPacket_t msg = {m >> 4, m | c, d1, d2};
MidiUSB.sendMIDI(msg);
MidiUSB.flush();

Pieter