pyupm_rotary module

class pyupm_rotary.Rotary(pin)[source]

Bases: object

API for the Rotary Angle Sensor (Knob)

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.

C++ includes: rotary.hpp

abs_deg()[source]

float abs_deg()

Gets absolute raw degrees from the AIO pin

Unsigned degrees from the ADC

abs_rad()[source]

float abs_rad()

Gets absolute raw radians from the AIO pin

Unsigned radians from the ADC

abs_value()[source]

float abs_value()

Gets the absolute raw value from the AIO pin

Unsigned value from the ADC

name()[source]

std::string name()

rel_deg()[source]

float rel_deg()

Gets relative degrees from the AIO pin

Signed degrees from the ADC

rel_rad()[source]

float rel_rad()

Gets relative radians from the AIO pin

Signed radians from the ADC

rel_value()[source]

float rel_value()

Gets the relative value from the AIO pin

Signed value from the ADC