31 lines
572 B
Markdown
31 lines
572 B
Markdown
# CCPotentiometer
|
|
|
|
Analog input mapped to CC value 0-127.
|
|
|
|
> Original: `Control-Change-Potentiometer.ino`
|
|
|
|
```cpp pico
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <cs_midi.h>
|
|
|
|
using namespace cs;
|
|
|
|
BluetoothMIDI_Interface midi;
|
|
|
|
CCPotentiometer pot {
|
|
26, // ADC pin (GPIO 26 = ADC0)
|
|
{MIDI_CC::Channel_Volume, Channel_1},
|
|
};
|
|
|
|
int main() {
|
|
stdio_init_all();
|
|
if (cyw43_arch_init()) return 1;
|
|
Control_Surface.begin();
|
|
while (true) {
|
|
Control_Surface.loop();
|
|
sleep_ms(1);
|
|
}
|
|
}
|
|
```
|