O
@rcolistete Maybe I misunderstood your question. The code I was referring to above is my own library that calls the 'built-in' machine.I2C micropython driver supplied in the LoPy firmware binary rev. 1.18.1.r1.
Example:
def __init__(self):
self.i2c = I2C(0, mode=I2C.MASTER, pins=(sda, scl), baudrate=100000);
magEnable = [0x10, 0x20, 0x00]
self.i2c.writeto_mem(MAG_DEV_ADDR, MAG_CONFIG_REG_A, bytearray(magEnable));