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

LSA: this class provides functions for LightSensorArray from mindsensors.com for read and write operations. More...

Inheritance diagram for mindsensors.LSA:

Public Member Functions

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

LSA: this class provides functions for LightSensorArray from mindsensors.com for read and write operations.

Constructor & Destructor Documentation

def mindsensors.LSA.__init__ (   self,
  lsa_address = LSA_ADDRESS 
)

Initialize the class with the i2c address of your LightSensorArray.

Parameters
selfThe object pointer.
lsa_addressAddress of your LightSensorArray.

Member Function Documentation

def mindsensors.LSA.Black_Cal (   self)

Calibrates the black value for the LightSensorArray.

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

Writes a value to the command register.

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

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

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

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

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

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

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

Wakes up or turns on the LEDs of the LightSensorArray.

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

Calibrates the white value for the LightSensorArray.

Parameters
selfThe object pointer.

Member Data Documentation

int mindsensors.LSA.LSA_CALIBRATED = 0x42
static

Calibrated Register.

Will return an 8 byte array

int mindsensors.LSA.LSA_UNCALIBRATED = 0x6A
static

Uncalibrated Register.

Will return an 8 byte array


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