upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the Grove Slide Potentiometer. More...
Basic UPM module for the Grove slide potentiometer on analog that returns either a raw value or a scaled voltage value.
Public Member Functions | |
synchronized void | delete () |
GroveSlide (long pin, float ref_voltage) | |
GroveSlide (long pin) | |
float | raw_value () |
float | voltage_value () |
float | ref_voltage () |
![]() | |
synchronized void | delete () |
String | name () |
GroveSlide | ( | long | pin, |
float | ref_voltage | ||
) |
Grove analog slide potentiometer constructor
pin | Number of the analog pin to use |
ref_voltage | Reference voltage the board is set to, as a floating-point value; default is 5.0V |
float raw_value | ( | ) |
Gets the raw value from the AIO pin
float ref_voltage | ( | ) |
Gets the board's reference voltage passed on object initialization
float voltage_value | ( | ) |
Gets the voltage value from the pin