cs-midi/tests/examples/interfaces/serial_midi.cpp

21 lines
444 B
C++

// Serial MIDI — classic 5-pin DIN MIDI over UART at 31250 baud.
// Uses hardware UART0 with TX on GPIO 12, RX on GPIO 13.
#include "pico/stdlib.h"
#include <cs_midi.h>
using namespace cs;
HardwareSerialMIDI_Interface midi {uart0, 12, 13};
CCRotaryEncoder enc {{0, 2}, {16, Channel_1}, 1, 4};
int main() {
stdio_init_all();
Control_Surface.begin();
while (true) {
Control_Surface.loop();
sleep_ms(1);
}
}