|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for Grove Slide Potentiometer. More...
Very basic UPM module for Grove slide potentiometer on analog, returns either raw value or scaled voltage value.
Public Member Functions | |
| GroveSlide (unsigned int pin, float ref_voltage=5.0) | |
| ~GroveSlide () | |
| float | raw_value () |
| float | voltage_value () |
| float | ref_voltage () |
Public Member Functions inherited from Grove | |
| std::string | name () |
Additional Inherited Members | |
Protected Attributes inherited from Grove | |
| std::string | m_name |
| GroveSlide | ( | unsigned int | pin, |
| float | ref_voltage = 5.0 |
||
| ) |
Grove analog slide potentiometer constructor
| pin | number of analog pin to use |
| ref_voltage | the reference voltage the board is set to as float, e.g. 3.3 or 5.0 (default) |

| ~GroveSlide | ( | ) |
GroveSlide Destructor
| float raw_value | ( | ) |
Get raw value from AIO pin

| float voltage_value | ( | ) |
Get the voltage value from the pin

| float ref_voltage | ( | ) |
Get the board's reference voltage passed on object initialization



1.8.9.1