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

LightSensorArray: this class provides PiStorms specific interface for LightSensorArray. More...

Inheritance diagram for MsDevices.LightSensorArray:

Public Member Functions

def __init__
 Initialize the class with the i2c address of your device. 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...
 

Static Public Attributes

int LSA_ADDRESS = 0x14
 Default LightSensorArray I2C Address.
 
int LSA_COMMAND = 0x41
 Command Register.
 
int LSA_CALIBRATED = 0x42
 Calibrated Register. More...
 
int LSA_UNCALIBRATED = 0x6A
 Uncalibrated Register. More...
 

Detailed Description

LightSensorArray: this class provides PiStorms specific interface for LightSensorArray.

Constructor & Destructor Documentation

def MsDevices.LightSensorArray.__init__ (   self,
  port,
  address = LSA_ADDRESS 
)

Initialize the class with the i2c address of your device.

Parameters
selfThe object pointer.
portThe PiStorms bank.
addressAddress of your device
Remarks

Member Function Documentation

def MsDevices.LightSensorArray.Black_Cal (   self)

Calibrates the black value for the LightSensorArray.

Parameters
selfThe object pointer.
def MsDevices.LightSensorArray.command (   self,
  cmd 
)

Writes a value to the command register.

Parameters
selfThe object pointer.
cmdValue to write to the command register.
def MsDevices.LightSensorArray.ReadRaw_Calibrated (   self)

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

Parameters
selfThe object pointer.
def MsDevices.LightSensorArray.ReadRaw_Uncalibrated (   self)

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

Parameters
selfThe object pointer.
def MsDevices.LightSensorArray.Sleep (   self)

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

Parameters
selfThe object pointer.
def MsDevices.LightSensorArray.Wakeup (   self)

Wakes up or turns on the LEDs of the LightSensorArray.

Parameters
selfThe object pointer.
def MsDevices.LightSensorArray.White_Cal (   self)

Calibrates the white value for the LightSensorArray.

Parameters
selfThe object pointer.

Member Data Documentation

int MsDevices.LightSensorArray.LSA_CALIBRATED = 0x42
static

Calibrated Register.

Will return an 8 byte array

int MsDevices.LightSensorArray.LSA_UNCALIBRATED = 0x6A
static

Uncalibrated Register.

Will return an 8 byte array


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