![]() |
Can Opener - ME 507
|
#include "encoder_counter.h"This file contains a class which allows timer/counters on an STM32 to be used to read quadrature encoders within the Arduino environment. This code is a bit kludgey, as it was put together quickly in response to a fairly urgent need, but it has been tested and seems to work. It comes with no guarantees; YMMV. Valuable assistance was found at https://www.edwinfairchild.com/2019/04/interface-rotary-encoder-right-way.html
There are specific pins which must be used for each timer, though some timers allow one to choose between two sets of pins.