PiStorms  4.012
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
mindsensors.LINELEADER Class Reference

LINELEADER: this class provides functions for Lineleader from mindsensors.com for read and write operations. More...

Inheritance diagram for mindsensors.LINELEADER:

Public Member Functions

def __init__
 Initialize the class with the i2c address of your Lineleader. More...
 
def command
 Writes a value to the command register. More...
 
def White_Cal
 Calibrates the white value for the LightSensorArray. More...
 
def Black_Cal
 Calibrates the black value for the LightSensorArray. More...
 
def Wakeup
 Wakes up or turns on the LEDs of the LightSensorArray. More...
 
def Sleep
 Puts to sleep, or turns off the LEDs of the LightSensorArray. More...
 
def ReadRaw_Calibrated
 Reads the eight(8) calibrated light sensor values of the LightSensorArray. More...
 
def ReadRaw_Uncalibrated
 Reads the eight(8) uncalibrated light sensor values of the LightSensorArray. More...
 
def steering
 Read the steering value from the Lineleader (add or subtract this value to the motor speed) More...
 
def average
 Read the average weighted value of the current line from position from the Lineleader. More...
 
def result
 Reads the result of all 8 light sensors form the LineLeader as 1 byte (1 bit for each sensor) More...
 
def getSetPoint
 Reads the eight(8) calibrated light sensor values of the LightSensorArray. More...
 
def setSetPoint
 Reads the eight(8) calibrated light sensor values of the LightSensorArray. More...
 
def setKP
 Write the Kp value to the Lineleader. More...
 
def setKI
 Write the Ki value to the Lineleader. More...
 
def setKD
 Write the Kd value to the Lineleader. More...
 
def setKPfactor
 Write the Kp factor value to the Lineleader. More...
 
def setKIfactor
 Write the Ki factor value to the Lineleader. More...
 
def setKDfactor
 Write the Kd factor value to the Lineleader. More...
 
def getKP
 Read the Kp value from the Lineleader. More...
 
def getKI
 Read the Ki value from the Lineleader. More...
 
def getKD
 Read the Kd value from the Lineleader. More...
 
def getKPfactor
 Read the Kp factor value to the Lineleader. More...
 
def getKIfactor
 Read the Ki factor value to the Lineleader. More...
 
def getKDfactor
 Read the Kd factor value to the Lineleader. More...
 

Static Public Attributes

int LL_ADDRESS = 0x02
 Default Lineleader I2C Address.
 
int LL_COMMAND = 0x41
 Command Register.
 
int LL_STEERING = 0x42
 Steering Register. More...
 
int LL_AVERAGE = 0x43
 Average Register. More...
 
int LL_RESULT = 0x44
 Steering Register. More...
 
int LL_SETPOINT = 0x45
 Setpoint Register.
 
int LL_Kp = 0x46
 KP Register.
 
int LL_KI = 0x47
 Ki Register.
 
int LL_KD = 0x48
 Kd Register.
 
int LL_KPfactor = 0x61
 Kp factor Register.
 
int LL_KIfactor = 0x62
 Ki factor Register.
 
int LL_KDfactor = 0x63
 Kd factor Register.
 
int LL_CALIBRATED = 0x49
 
int LL_UNCALIBRATED = 0x74
 

Detailed Description

LINELEADER: this class provides functions for Lineleader from mindsensors.com for read and write operations.

Constructor & Destructor Documentation

def mindsensors.LINELEADER.__init__ (   self,
  ll_address = LL_ADDRESS 
)

Initialize the class with the i2c address of your Lineleader.

Parameters
selfThe object pointer.
ll_addressAddress of your LightSensorArray.

Member Function Documentation

def mindsensors.LINELEADER.average (   self)

Read the average weighted value of the current line from position from the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.Black_Cal (   self)

Calibrates the black value for the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.command (   self,
  cmd 
)

Writes a value to the command register.

Parameters
selfThe object pointer.
cmdValue to write to the command register.
def mindsensors.LINELEADER.getKD (   self)

Read the Kd value from the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getKDfactor (   self)

Read the Kd factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getKI (   self)

Read the Ki value from the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getKIfactor (   self)

Read the Ki factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getKP (   self)

Read the Kp value from the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getKPfactor (   self)

Read the Kp factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.getSetPoint (   self)

Reads the eight(8) calibrated light sensor values of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.ReadRaw_Calibrated (   self)

Reads the eight(8) calibrated light sensor values of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.ReadRaw_Uncalibrated (   self)

Reads the eight(8) uncalibrated light sensor values of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.result (   self)

Reads the result of all 8 light sensors form the LineLeader as 1 byte (1 bit for each sensor)

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKD (   self)

Write the Kd value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKDfactor (   self)

Write the Kd factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKI (   self)

Write the Ki value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKIfactor (   self)

Write the Ki factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKP (   self)

Write the Kp value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setKPfactor (   self)

Write the Kp factor value to the Lineleader.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.setSetPoint (   self)

Reads the eight(8) calibrated light sensor values of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.Sleep (   self)

Puts to sleep, or turns off the LEDs of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.steering (   self)

Read the steering value from the Lineleader (add or subtract this value to the motor speed)

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.Wakeup (   self)

Wakes up or turns on the LEDs of the LightSensorArray.

Parameters
selfThe object pointer.
def mindsensors.LINELEADER.White_Cal (   self)

Calibrates the white value for the LightSensorArray.

Parameters
selfThe object pointer.

Member Data Documentation

int mindsensors.LINELEADER.LL_AVERAGE = 0x43
static

Average Register.

Will return a byte value

int mindsensors.LINELEADER.LL_RESULT = 0x44
static

Steering Register.

Will return a byte value

int mindsensors.LINELEADER.LL_STEERING = 0x42
static

Steering Register.

Will return a signed byte value


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