Closed AntonSuklje closed 2 years ago
I would think example 5 in the readme should nail it?
Yeah, that works. Thanks for the tip Karl-Petter.
from smbus2 import SMBus, i2c_msg bus = SMBus(1)
msg = i2c_msg.read(0x70,4) bus.i2c_rdwr(msg) data = list(msg)
Is it possible to read 4 bytes without defining the offset register? Working example in Micropython: from machine import Pin, I2C i2c = I2C (scl=Pin (18), sda=Pin (19), freq=100000) data = i2c.readfrom (slave_addr, 4)