|
PicoLowLevel
|
Class used to read data from traction rotary encoders. More...
#include <TractionEncoder.h>
Public Member Functions | |
| TractionEncoder (byte pin_a, byte pin_b, Filter< int > *filter=NULL, bool invert=false, PIO pio=pio0) | |
| Creates object. | |
| void | begin () |
| Sets the encoder's pins and attach the interrupt. | |
| int | getSpeed () |
| Returns the last detected speed. | |
| int | getSteps () |
| Returns the number of steps since the class was initialized. | |
Class used to read data from traction rotary encoders.
| TractionEncoder::TractionEncoder | ( | byte | pin_a, |
| byte | pin_b, | ||
| Filter< int > * | filter = NULL, |
||
| bool | invert = false, |
||
| PIO | pio = pio0 |
||
| ) |
Creates object.
| pin_a | Pin A of the encoder. |
| pin_b | Pin B of the encoder. |
| filter | Filter to apply to the encoder's output. NULL if no filter is needed. |
| invert | Invert the encoder's output. |
| pio | PIO to use. Each PIO can handle up to 4 encoders. |
| void TractionEncoder::begin | ( | ) |
Sets the encoder's pins and attach the interrupt.

| int TractionEncoder::getSpeed | ( | ) |
Returns the last detected speed.


| int TractionEncoder::getSteps | ( | ) |
Returns the number of steps since the class was initialized.
