PiStorms  4.015
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
mindsensors.ANGLE Class Reference

Angle: this class provides functions for GlideWheel-AngleSensor from mindsensors.com for read and write operations. More...

Inheritance diagram for mindsensors.ANGLE:

Public Member Functions

def __init__
 Initialize the class with the i2c address of your AngleSensor. More...
 
def command
 Writes a value to the command register. More...
 
def get_angle
 Reads the angle in degrees. More...
 
def get_raw
 Reads the raw angle value, raw = angle x 2. More...
 
def get_rpm
 Reads the rotations per minute. More...
 

Static Public Attributes

tuple ANGLE_ADDRESS = (0x30)
 Default Angle Sensor I2C Address.
 
int COMMAND = 0x41
 Command Register.
 
int ANGLE = 0x42
 Angle Register. More...
 
int RAW = 0x46
 Raw Angle Register. More...
 
int RPM = 0x4A
 RPM Rate Register. More...
 

Detailed Description

Angle: this class provides functions for GlideWheel-AngleSensor from mindsensors.com for read and write operations.

Constructor & Destructor Documentation

def mindsensors.ANGLE.__init__ (   self,
  angle_address = ANGLE_ADDRESS 
)

Initialize the class with the i2c address of your AngleSensor.

Parameters
selfThe object pointer.
angle_addressAddress of your AngleSensor.

Member Function Documentation

def mindsensors.ANGLE.command (   self,
  command 
)

Writes a value to the command register.

Parameters
selfThe object pointer.
commandValue to write to the command register.
def mindsensors.ANGLE.get_angle (   self)

Reads the angle in degrees.

Parameters
selfThe object pointer.
def mindsensors.ANGLE.get_raw (   self)

Reads the raw angle value, raw = angle x 2.

Parameters
selfThe object pointer.
def mindsensors.ANGLE.get_rpm (   self)

Reads the rotations per minute.

Parameters
selfThe object pointer.

Member Data Documentation

int mindsensors.ANGLE.ANGLE = 0x42
static

Angle Register.

Will return a long signed integer reading

int mindsensors.ANGLE.RAW = 0x46
static

Raw Angle Register.

Will return a long signed integer reading

int mindsensors.ANGLE.RPM = 0x4A
static

RPM Rate Register.

Will return a signed integer reading


The documentation for this class was generated from the following file: