I am new to the raspberry pi and I have been working through some i2c examples. I am receiving an IO Error: [Errno 22]Invalid argument when I run the code below:
import smbus
bus = smbus.SMBus(1)
addr = 0xa0
data = 0x20
bus.write_byte(addr, data)
Would someone please explain why this might be happening? I can see the device using the i2cdetect in the terminal but my code is failing. Any help would be greatly appreciated.