Slide Class
- ID: slide
- Name: Slide Potentiometer
- Other Names: Grove Slide
- Category: ainput
- Manufacturer: seeed
- Link: http://wiki.seeed.cc/Grove-Slide_Potentiometer/
- Connection: analog
Basic UPM module for the slide potentiometer on analog that returns either a raw value or a scaled voltage value.
Item Index
Methods
Methods
Slide
(
Number
-
pin
-
ref_voltage
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:
Number:
raw_value
()
Number
Gets the raw value from the AIO pin
Returns:
Number:
Raw value from the ADC
voltage_value
()
Number
Gets the voltage value from the pin
Returns:
Number:
Voltage reading based on the reference voltage
ref_voltage
()
Number
Gets the board's reference voltage passed on object initialization
Returns:
Number:
Reference voltage the class was set for
name
()
String
Returns:
String: