34 lines
763 B
Markdown
34 lines
763 B
Markdown
# CCIncrementDecrementButtons
|
|
|
|
Two buttons for CC increment/decrement with optional reset.
|
|
|
|
> Original: `CCIncrementDecrementButtons.ino`
|
|
|
|
```cpp pico
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
CCIncrementDecrementButtons buttons {
|
|
{5, 6}, // increment pin, decrement pin
|
|
{16, Channel_1}, // CC address
|
|
1, // multiplier
|
|
{0x45, Channel_1}, // reset note (sent when both pressed)
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
RelativeCCSender::setMode(relativeCCmode::MACKIE_CONTROL_RELATIVE);
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|