Rotary Class
- ID: rotary
- Name: Rotary Angle Sensor
- Other Names: Rotary Potentiometer, Grove Rotary Angle Sensor
- Category: ainput
- Manufacturer: seeed
- Link: http://wiki.seeed.cc/Grove-Rotary_Angle_Sensor/
- Connection: analog
- Kit: gsk
Basic UPM module for the rotary angle sensor (knob) on analog. Provides a set of functions to read the absolute pin value, degrees or radians, and another set to do the same relative to the center of the knob's range.
Methods
Rotary
-
pin
Rotary angle sensor constructor
Parameters:
-
pin
NumberNumber of the analog pin to use
Returns:
abs_value
()
Number
Gets the absolute raw value from the AIO pin
Returns:
Unsigned value from the ADC
abs_deg
()
Number
Gets absolute raw degrees from the AIO pin
Returns:
Unsigned degrees from the ADC
abs_rad
()
Number
Gets absolute raw radians from the AIO pin
Returns:
Unsigned radians from the ADC
rel_value
()
Number
Gets the relative value from the AIO pin
Returns:
Signed value from the ADC
rel_deg
()
Number
Gets relative degrees from the AIO pin
Returns:
Signed degrees from the ADC
rel_rad
()
Number
Gets relative radians from the AIO pin
Returns:
Signed radians from the ADC