GroveSlide Class
- ID: groveslide
- Name: Slide Potentiometer
- Category: ainput
- Manufacturer: seeed
- Connection: analog
Basic UPM module for the Grove slide potentiometer on analog that returns either a raw value or a scaled voltage value.
Item Index
Methods
Methods
GroveSlide
-
pin
-
ref_voltage
Grove analog slide potentiometer constructor
Parameters:
-
pin
NumberNumber of the analog pin to use
-
ref_voltage
NumberReference voltage the board is set to, as a floating-point value; default is 5.0V
Returns:
raw_value
()
Number
Gets the raw value from the AIO pin
Returns:
Raw value from the ADC
voltage_value
()
Number
Gets the voltage value from the pin
Returns:
Voltage reading based on the reference voltage
ref_voltage
()
Number
Gets the board's reference voltage passed on object initialization
Returns:
Reference voltage the class was set for