34 lines
555 B
Markdown
34 lines
555 B
Markdown
# CCButtonMatrix
|
|
|
|
Grid of CC buttons using row/column scanning.
|
|
|
|
```cpp pico
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
CCButtonMatrix<2, 3> matrix {
|
|
{0, 1}, // row pins
|
|
{2, 3, 4}, // column pins
|
|
{{
|
|
{16, 17, 18},
|
|
{19, 20, 21},
|
|
}},
|
|
Channel_1,
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|