rotary_encoder v1.0.0 RotaryEncoder.State View Source

This holds all state information for a given encoder.

NameDescription
nameThe given name of the encoder
encoder_a_pinThe "A" pin number for the rotary encoder
encoder_b_pinThe "B" pin number for the rotary encoder
button_pinThe pin representing the dial button
btn_default_stateSet when beginning monitoring of an encoder. This value depends on the wiring of your encoder
valueThe value for the encoder, cumulative steps since startup or being reset. Useful for the client but available directly through RotaryRncoder.get_value/1
last_directionThe last movement registered by the rotary encoder. Defaults to :neutral and can also be :ccw and :cw
pidThe pid of the encoder process. Usually not needed by client projects
aThe state of the A pin. Usually not needed by client projects
bThe state of the B pin. Usually not needed by client projects
last_btn_eventUsed internally to determine click duration. Usually not needed by client projects
attachedUsed internally to determine encoder validity. Usually not needed by client projects