Library to handle a quadrature encoder with interrupts
RotaryEncoder Class Reference
Class to handle a rotary encoder The lib is interrupt based, therefore no update functions have to be called. More...
#include <Encoder.h>
Public Member Functions | |
int | position () |
Returns the overall position of the encoder. | |
int | delta () |
Returns the encoders change since the last call to this function. |
Detailed Description
Class to handle a rotary encoder The lib is interrupt based, therefore no update functions have to be called.
Example usage:
#include "mbed.h" #include "Encoder.h" RotaryEncoder encoder(D3, D4); int main() { while(1) { int pos = encoder.position(); wait(1.0f); } }
Definition at line 24 of file Encoder.h.
Member Function Documentation
int delta | ( | ) |
Generated on Mon Jul 18 2022 21:55:59 by 1.7.2