upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
API for the Rotary Angle Sensor (Knob) More...
Basic UPM module for the rotary angle sensor (knob) on analog. Provides a set of functions to read the absolute pin value, degrees or radians, and another set to do the same relative to the center of the knob's range.
Public Member Functions | |
Rotary (unsigned int pin) | |
~Rotary () | |
float | abs_value () |
float | abs_deg () |
float | abs_rad () |
float | rel_value () |
float | rel_deg () |
float | rel_rad () |
std::string | name () |
Rotary | ( | unsigned int | pin | ) |
Rotary angle sensor constructor
pin | Number of the analog pin to use |
float abs_value | ( | ) |
Gets the absolute raw value from the AIO pin
float abs_deg | ( | ) |
Gets absolute raw degrees from the AIO pin
float abs_rad | ( | ) |
Gets absolute raw radians from the AIO pin
float rel_value | ( | ) |
Gets the relative value from the AIO pin
float rel_deg | ( | ) |
Gets relative degrees from the AIO pin
float rel_rad | ( | ) |
Gets relative radians from the AIO pin