Spike Prime & Robot Inventor python Library Reference
Spike Prime & Robot Inventor python Library
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lib.mindsensors.SPIKEi2c Class Reference
Inheritance diagram for lib.mindsensors.SPIKEi2c:
lib.mindsensors.DIST lib.mindsensors.EV3FLOW lib.mindsensors.EV3FPS lib.mindsensors.EV3LIGHTS lib.mindsensors.EV3RFID lib.mindsensors.GOOGLYEYES lib.mindsensors.IRTHERMO lib.mindsensors.NXTCAM lib.mindsensors.PFMATE lib.mindsensors.TMP275

Public Member Functions

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.
 

Public Attributes

 SCL
 
 SDA
 
 address
 
 int_clk
 

Static Public Attributes

int int_clk = -1
 

Member Function Documentation

◆ readArray()

def lib.mindsensors.SPIKEi2c.readArray (   self,
  reg,
  len 
)

read len long data array at reg of the i2c device

Parameters
reg,i2cdevice register location
len,lengthof data to read

◆ readByte()

def lib.mindsensors.SPIKEi2c.readByte (   self,
  reg 
)

Read the byte from reg of the i2c device.

Parameters
reg,i2cdevice register location

◆ readInteger()

def lib.mindsensors.SPIKEi2c.readInteger (   self,
  reg 
)

Read the int from reg of the i2c device.

Parameters
reg,i2cdevice register location

◆ readIntegerSigned()

def lib.mindsensors.SPIKEi2c.readIntegerSigned (   self,
  reg 
)

Read the signed int from reg of the i2c device.

Parameters
reg,i2cdevice register location

◆ readLong()

def lib.mindsensors.SPIKEi2c.readLong (   self,
  reg 
)

Read the long from reg of the i2c device.

Parameters
reg,i2cdevice register location

◆ readString()

def lib.mindsensors.SPIKEi2c.readString (   self,
  reg,
  length 
)

Read the string of len from reg of the i2c device.

Parameters
reg,i2cdevice register location
length,lengthof data to read

◆ writeArray()

def lib.mindsensors.SPIKEi2c.writeArray (   self,
  reg,
  arr 
)

write data array at reg of the i2c device

Parameters
reg,i2cdevice register location
arr,arrayto write

◆ writeByte()

def lib.mindsensors.SPIKEi2c.writeByte (   self,
  reg,
  value 
)

write value at reg of the i2c device

Parameters
reg,i2cdevice register location
value,valueto write

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