fusion_hat.modules.rotary_encoder module
- class fusion_hat.modules.rotary_encoder.Rotary_Encoder(clk, dt, *, bounce_time=0.002, reverse=False)[source]
Bases:
object- _a_rising()[source]
Called on rising edge of channel A. Read channel B to determine rotation direction. Typical rule:
A↑ with B=0 -> CW (+1) A↑ with B=1 -> CCW (-1)
- _a_falling()[source]
Called on falling edge of channel A. Read channel B to determine rotation direction. Typical rule:
A↓ with B=1 -> CW (+1) A↓ with B=0 -> CCW (-1)