|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Quadrature encoder component — Gray code state machine. More...
Quadrature encoder component — Gray code state machine.
Encoder tracks rotational position from A/B quadrature signals. Uses a 16-entry transition table for robust decoding. The encoder's push-button is a separate Button component (composable).
Usage: sbl::components::input::Encoder enc; enc.update(gpio_a, gpio_b); // Feed A/B each tick int32_t d = enc.delta(); // Steps since last check (+CW/-CCW) int32_t pos = enc.position(); // Cumulative position
Definition in file encoder.hpp.
#include <cstdint>Go to the source code of this file.
Classes | |
| class | sbl::components::input::Encoder |
| Quadrature encoder with Gray code state machine and position tracking. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs code. | |
| namespace | sbl::components |
| Functional hardware components. | |
| namespace | sbl::components::input |
| Pots, buttons, encoders. | |