upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for Grove Rotary Angle Sensor (Knob) More...
Very basic UPM module for Grove rotary angle sensor (knob) on analog. Provides a set of functions to read the absolute pin value, degrees or radians and another to do the same relative to the center of the knob's range.
Public Member Functions | |
GroveRotary (unsigned int pin) | |
~GroveRotary () | |
float | abs_value () |
float | abs_deg () |
float | abs_rad () |
float | rel_value () |
float | rel_deg () |
float | rel_rad () |
![]() | |
std::string | name () |
Additional Inherited Members | |
![]() | |
std::string | m_name |
GroveRotary | ( | unsigned int | pin | ) |
Grove rotary angle sensor constructor
pin | number of analog pin to use |
~GroveRotary | ( | ) |
GroveRotary Destructor
float abs_value | ( | ) |
Get absolute raw value from AIO pin
float abs_deg | ( | ) |
Get absolute raw degrees from AIO pin
float abs_rad | ( | ) |
Get absolute raw radians from AIO pin
float rel_value | ( | ) |
Get the relative value from the pin
float rel_deg | ( | ) |
Get relative degrees from AIO pin
float rel_rad | ( | ) |
Get relative radians from AIO pin