550 B
550 B
PBAbsoluteEncoder
Encoder position mapped to 14-bit Pitch Bend.
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"
#include <cs_midi.h>
using namespace cs;
BluetoothMIDI_Interface midi;
PBAbsoluteEncoder enc {
{0, 2}, // encoder pins
Channel_1,
127, // large multiplier for PB's 14-bit range
4, // pulses per step
};
int main() {
stdio_init_all();
if (cyw43_arch_init()) return 1;
Control_Surface.begin();
while (true) {
Control_Surface.loop();
sleep_ms(1);
}
}