34 lines
693 B
Markdown
34 lines
693 B
Markdown
# CCRotaryEncoder
|
|
|
|
Relative CC encoder for DAW parameter control.
|
|
|
|
> Original: `RotaryEncoder.ino`
|
|
|
|
```cpp
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
CCRotaryEncoder enc {
|
|
{0, 2}, // encoder pins A and B (constructs AHEncoder)
|
|
{16, Channel_1}, // CC address
|
|
1, // speed multiplier
|
|
4, // pulses per step
|
|
};
|
|
|
|
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);
|
|
}
|
|
}
|
|
```
|