30 lines
579 B
Markdown
30 lines
579 B
Markdown
# NoteButtons
|
|
|
|
Multiple note buttons with sequential addresses.
|
|
|
|
```cpp
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
NoteButtons<4> buttons {
|
|
{2, 3, 4, 5}, // GPIO pins
|
|
{MIDI_Notes::C[4], Channel_1}, // base address
|
|
1, // increment between addresses
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|