Rotary Encoder Example#
Overview#
This sample demonstrates blocking event reads for a rotary encoder.
Source file:
src/rtsmart/examples/peripheral/rotary_encoder/test_rotary_encoder.c
Sample Behavior#
waits for events through
rotary_encoder_wait_event()prints
delta,total_count, direction, and timestampresets the counter after a 2-second long press
Runtime Parameters#
./test_rotary_encoder [timeout_ms]
Build and Run#
cd src/rtsmart/examples/peripheral/rotary_encoder
make
./test_rotary_encoder [timeout_ms]
Notes#
Enable CONFIG_ENABLE_ROTARY_ENCODER before using the sample.
