Arduino quadrature encoder library based on RPI Pico PIO example.
This library allows to read and reset any quadrature encoder attached to a RP2040 mcu.
PioEncoder encoder(<first pin>);
void setup(){
encoder.begin();
}
void loop(){
...
int counts = encoder.getCount();
...
encoder.reset();
...
}
Note: encoder pins must be consecutive (e.g. 2 and 3, 10 and 11 etc.)
Copyright © 2023 G. Bruno - gbr1.github.io