Programming with MicroPython: I2C Device
Import FutureBoard Library
Import the Library to make use of its functions.
13: I2C
Initiate I2C Device
I2C Scan Address
I2C Read
Returns data from the memory address. Parameter nbytes define length of data.
I2C Read into Buffer
Reads data from the memory address. The data sill be stored in parameter buf, which must be a bytearray.
I2C Write
Write data to a memory address. The data in buf will be written to the device, buf must be a bytearray.
I2C Write Vector
Write a vector to a memory address.
I2C Read from Memory
Reads data from the I2C device address represented by address. Reads data from the memory address represented by memaddr. Parameter nbytes define length of data being read. Parameter addrsize define the size of the memory.
I2C Read from Memory into Buffer
Reads data from the I2C device address represented by address. Reads data from the memory address represented by memaddr. The data sill be stored in parameter buf, which must be a bytearray. Parameter addrsize define the size of the memory.
I2 Write Buffer to Memory
Writes data to the I2C device address represented by address. Writes data to the memory address represented by memaddr. The data in buf will be written to the device, buf must be a bytearray or byte. Parameter addrsize define the size of the memory.
Last updated