#include <Rotary-encoder-easyC-SOLDERED.h>
Inherits EasyC.
|
| | Rotary () |
| | Rotary specific native constructor.
|
| |
| long | getCount () |
| | Get counter from rotary encoder breakout.
|
| |
| byte | getState () |
| | Get state of the rotary encoder.
|
| |
| void | resetCounter () |
| | Reset the internal counter on the breakout.
|
| |
| | EasyC () |
| | Main constructor for easyC version.
|
| |
| void | begin () |
| | Initializes sensors on native or easyC on default address.
|
| |
| void | begin (uint8_t _address) |
| | Initializes sensors on supplied i2c address.
|
| |
| int | sendAddress (char regAddr) |
| | Private function to send a single byte to sensor.
|
| |
| int | readData (char a[], int n) |
| | Private function to read n bytes over i2c.
|
| |
| int | readRegister (char regAddr, char a[], size_t n) |
| | Private function to send over i2c and then read n bytes.
|
| |
| int | sendData (const uint8_t *a, int n) |
| | Private function to write n bytes over i2c.
|
| |
|
| void | initializeNative () |
| | Overloaded function for virtual in base class to initialize sensor specific.
|
| |
|
| void | getData () |
| | Get data from the breakout and store them in class variables.
|
| |
◆ Rotary()
Rotary specific native constructor.
◆ getCount()
| long Rotary::getCount |
( |
| ) |
|
Get counter from rotary encoder breakout.
- Returns
- Counter variable.
◆ getData()
Get data from the breakout and store them in class variables.
◆ getState()
| byte Rotary::getState |
( |
| ) |
|
Get state of the rotary encoder.
- Returns
- 0 If the rotary encoder doesn't move 1 If the button is presed once 2 If the button is pressed twice 3 If the button is long pressed 4 For long button press release 5 If the rotary encoder rotates counterclockwise 6 If the rotary encoder rotates clockwise
◆ initializeNative()
| void Rotary::initializeNative |
( |
| ) |
|
|
protectedvirtual |
Overloaded function for virtual in base class to initialize sensor specific.
Implements EasyC.
◆ resetCounter()
| void Rotary::resetCounter |
( |
| ) |
|
Reset the internal counter on the breakout.
◆ rotaryCounter
| long Rotary::rotaryCounter |
|
private |
◆ rotaryState
The documentation for this class was generated from the following files: