Spike Prime & Robot Inventor python Library Reference
Spike Prime & Robot Inventor python Library
Public Member Functions | Static Public Attributes | List of all members
lib.mindsensors.GOOGLYEYES Class Reference
Inheritance diagram for lib.mindsensors.GOOGLYEYES:
lib.mindsensors.SPIKEi2c

Public Member Functions

def __init__ (self, port, address=GooglyEyes_ADDRESS)
 Initialize the class with the i2c address of your GooglyEyes. More...
 
def all_pixel (self, RGB)
 Set all pixels to RGB [R, G, B]. More...
 
def pixel (self, pix, RGB)
 Set one pixels to RGB [R, G, B]. More...
 
def pixel_write (self, pix, RGB)
 Set one pixels to RGB [R, G, B]. More...
 
def clear (self)
 clear all the pixel data and show
 
def blank (self)
 blank all the pixel without clearing data resumed by show
 
def show (self)
 show (light) all the pixel on
 
def command (self, cmd)
 Writes a value to the command register. More...
 
- Public Member Functions inherited from lib.mindsensors.SPIKEi2c
def __init__ (self, port, i2c_address, bitrate=100)
 
def readByte (self, reg)
 Read the byte from reg of the i2c device. More...
 
def readArray (self, reg, len)
 read len long data array at reg of the i2c device More...
 
def writeByte (self, reg, value)
 write value at reg of the i2c device More...
 
def writeArray (self, reg, arr)
 write data array at reg of the i2c device More...
 
def readString (self, reg, length)
 Read the string of len from reg of the i2c device. More...
 
def readInteger (self, reg)
 Read the int from reg of the i2c device. More...
 
def readIntegerSigned (self, reg)
 Read the signed int from reg of the i2c device. More...
 
def readLong (self, reg)
 Read the long from reg of the i2c device. More...
 
def GetFirmwareVersion (self)
 Read the firmware version of the i2c device.
 
def GetVendorName (self)
 Read the vendor name of the i2c device.
 
def GetDeviceId (self)
 Read the i2c device id.
 

Static Public Attributes

int GooglyEyes_ADDRESS = 0x2C
 Default GooglyEyes I2C Address.
 
 GooglyEyes_address
 
 port
 
 GooglyEyes_Pix
 Constants to specify Float Action.
 
 GooglyEyes_COMMAND
 Command Register.
 
- Static Public Attributes inherited from lib.mindsensors.SPIKEi2c
int int_clk = -1
 

Additional Inherited Members

- Public Attributes inherited from lib.mindsensors.SPIKEi2c
 SCL
 
 SDA
 
 address
 
 int_clk
 

Constructor & Destructor Documentation

◆ __init__()

def lib.mindsensors.GOOGLYEYES.__init__ (   self,
  port,
  address = GooglyEyes_ADDRESS 
)

Initialize the class with the i2c address of your GooglyEyes.

Parameters
portSpike Prime port, GooglyEyes is connected to.
addressis Address of your GooglyEyes, skip to use default.

Member Function Documentation

◆ all_pixel()

def lib.mindsensors.GOOGLYEYES.all_pixel (   self,
  RGB 
)

Set all pixels to RGB [R, G, B].

Parameters
RGBis RGB [R, G, B]

◆ command()

def lib.mindsensors.GOOGLYEYES.command (   self,
  cmd 
)

Writes a value to the command register.

Parameters
cmd– value to write to the command register.

◆ pixel()

def lib.mindsensors.GOOGLYEYES.pixel (   self,
  pix,
  RGB 
)

Set one pixels to RGB [R, G, B].

Parameters
pixis index of pixel to set
RGBis RGB [R, G, B]

◆ pixel_write()

def lib.mindsensors.GOOGLYEYES.pixel_write (   self,
  pix,
  RGB 
)

Set one pixels to RGB [R, G, B].

Parameters
pixis index of pixel to set
RGBis RGB [R, G, B]

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