# Rotary Encoder Example

## Overview

This sample demonstrates blocking event reads for a rotary encoder.

Source file:

```bash
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 timestamp
- resets the counter after a 2-second long press

## Runtime Parameters

```bash
./test_rotary_encoder [timeout_ms]
```

## Build and Run

```bash
cd src/rtsmart/examples/peripheral/rotary_encoder
make
./test_rotary_encoder [timeout_ms]
```

## Notes

Enable `CONFIG_ENABLE_ROTARY_ENCODER` before using the sample.
