41 lines
981 B
Markdown
41 lines
981 B
Markdown
|
# Encoder C++ Examples <!-- omit in toc -->
|
||
|
|
||
|
- [Examples](#examples)
|
||
|
- [Read Counts](#read-counts)
|
||
|
- [Read Change](#read-change)
|
||
|
- [Read Speed](#read-speed)
|
||
|
- [Value Dial](#value-dial)
|
||
|
- [Item Selector](#item-selector)
|
||
|
|
||
|
|
||
|
## Examples
|
||
|
|
||
|
### Read Counts
|
||
|
[encoder_read_counts.cpp](encoder_read_counts.cpp)
|
||
|
|
||
|
An example of how to read a mechanical rotary encoder.
|
||
|
|
||
|
|
||
|
### Read Change
|
||
|
[encoder_read_change.cpp](encoder_read_change.cpp)
|
||
|
|
||
|
An example of how to read a mechanical rotary encoder, only when a change has occurred.
|
||
|
|
||
|
|
||
|
### Read Speed
|
||
|
[encoder_read_speed.cpp](encoder_read_speed.cpp)
|
||
|
|
||
|
An example of how to read the speed a mechanical rotary encoder is being turned at.
|
||
|
|
||
|
|
||
|
### Value Dial
|
||
|
[encoder_value_dial.cpp](encoder_value_dial.cpp)
|
||
|
|
||
|
A demonstration of a rotary encoder being used to control a value.
|
||
|
|
||
|
|
||
|
### Item Selector
|
||
|
[encoder_item_selector.cpp](encoder_item_selector.cpp)
|
||
|
|
||
|
A demonstration of a rotary encoder being used to select items based on its physical position.
|