These I2C commands will work for any I2C address on the local bus and remote devices configured in the Target ID and Target alias registers of the device. The 8-bit form of I2C addresses should be used.
board.ReadI2C(Device Address, Register Address Byte 2,[Register Address Byte 1, # of Bytes]) OR board.ReadI2C(Device Address, Register Address Byte 2, [Register Address Byte 1])I2C Read Command for devices with multi-byte register addresses- Accepts both hex & decimal inputs
- Number of bytes will default to 1 if omitted
- Ex: board.ReadI2C(0x60, 0x30, [0x00]) will return the value in Register 0x3000 for the device with address 0x60 (8-bit form)
board.WriteI2C(Device Address, Register Address Byte 2, [Register Address Byte 1, Data])I2C Write Command for devices with multi-byte register addresses- Accepts both hex & decimal inputs
- Number of bytes will default to 1 if omitted
- • Ex: board.WriteI2C(0x60, 0x30, [0x01, 0x01]) will set Register 0x3000 of the device with address 0x60 (8-bit form) to have a value of 1