I am trying to get I2C to work on esp32-s2 device (feather-s2), but I keep getting the " TypeError: object with buffer protocol required". I don't even know, what this error means?
Code: Select all
>>>i2c = machine.I2C(0, freq=100_100)
>>> i2c.scan()
[105]
>>> data = bytearray(b'\x05\x00\xf6')
>>> response = i2c.writeto(105, 0x0010, data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object with buffer protocol required
>>> response = i2c.writeto(105, 0x0010, b'\x05\x00\xf6')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object with buffer protocol required
Thanks!