OE - Pi  1.1
 All Classes Namespaces Functions
pilight.PILIGHT Class Reference

PILIGHT: this class provides functions for PiLight for read and write operations. More...

Inheritance diagram for pilight.PILIGHT:
OpenElectrons_i2c.OpenElectrons_i2c

Public Member Functions

def __init__
 Initialize the class with the i2c address of the PiLight. More...
 
def readPiLight
 Reads the RGB values of the PiLight. More...
 
def setTimeout
 Writes the timeout value of the PiLight. More...
 
def createPiLight
 Writes the RGB values of the PiLight. More...
 
- Public Member Functions inherited from OpenElectrons_i2c.OpenElectrons_i2c
def __init__
 Initialize the class with the i2c address of your device. More...
 
def errMsg
 Prints an error message if a read error is detected. More...
 
def writeByte
 Write a byte to your i2c device at a given location. More...
 
def readByte
 Read an unsigned byte from your i2c device at a given location. More...
 
def simpleWriteByte
 Write a byte to your i2c device at a given location. More...
 
def simpleReadByte
 Read an unsigned byte from your i2c device at a given location. More...
 
def readByteSigned
 Read a signed byte from your i2c device at a given location. More...
 
def readArray
 Read a byte array from your i2c device starting at a given location. More...
 
def writeArray
 Write a byte array from your i2c device starting at a given location. More...
 
def readString
 Read a string from your i2c device starting at a given location. More...
 
def readIntegerBE
 Read an unsigned 16 bit integer from your i2c device from a given location. More...
 
def readInteger
 Read an unsigned 16 bit integer from your i2c device from a given location. More...
 
def readIntegerSignedBE
 Read a signed 16 bit integer from your i2c device from a given location. More...
 
def readIntegerSigned
 Read a signed 16 bit integer from your i2c device from a given location. More...
 
def readLongBE
 Read an unsigned 32bit integer from your i2c device from a given location. More...
 
def readLong
 Read an unsigned 32bit integer from your i2c device from a given location. More...
 
def readLongSignedBE
 Read a signed 32bit integer from your i2c device from a given location. More...
 
def readLongSigned
 Read a signed 32bit integer from your i2c device from a given location. More...
 
def GetFirmwareVersion
 Read the firmware version of the i2c device. More...
 
def GetVendorName
 Read the vendor name of the i2c device. More...
 
def GetDeviceId
 Read the i2c device id. More...
 

Static Public Attributes

tuple PILIGHT_ADDRESS = (0x30)
 
int PILIGHT_WHO_AM_I = 0x10
 
int PILIGHT_VERSION = 0x00
 
int PILIGHT_VENDOR = 0x08
 
int PILIGHT_RED = 0x42
 
int PILIGHT_GREEN = 0x43
 
int PILIGHT_BLUE = 0x44
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenElectrons_i2c.OpenElectrons_i2c
def pi_rev
 
def which_bus
 
- Public Attributes inherited from OpenElectrons_i2c.OpenElectrons_i2c
 address
 
 bus
 

Detailed Description

PILIGHT: this class provides functions for PiLight for read and write operations.

Constructor & Destructor Documentation

def pilight.PILIGHT.__init__ (   self,
  pilight_address = PILIGHT_ADDRESS 
)

Initialize the class with the i2c address of the PiLight.

Parameters
selfThe object pointer.
i2c_addressAddress of your PiLight.

Member Function Documentation

def pilight.PILIGHT.createPiLight (   self,
  red,
  green,
  blue 
)

Writes the RGB values of the PiLight.

Parameters
selfThe object pointer.
redThe red value to set to the PiLight
greenThe green value to set to the PiLight
blueThe blue value to set to the PiLight
def pilight.PILIGHT.readPiLight (   self)

Reads the RGB values of the PiLight.

Parameters
selfThe object pointer.
def pilight.PILIGHT.setTimeout (   self,
  timeoutValue 
)

Writes the timeout value of the PiLight.

Parameters
selfThe object pointer.
timeoutValueThe value to set the timeout

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