31 lines
471 B
Markdown
31 lines
471 B
Markdown
# PCButton
|
|
|
|
Sends Program Change on button press.
|
|
|
|
> Original: `PCButton.ino`
|
|
|
|
```cpp pico
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
PCButton pcBtn {
|
|
2,
|
|
{MIDI_PC::Steel_Drums, Channel_1},
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|