import mraa
# x is your i2c bus instance...........
# 0x50 is the i2c client...............
x = mraa.I2c(0)
x.address(0x50)
reg = int(input("read the register from: "))
d = x.readReg(reg)
print("stored data is: " + str(d))
Able to store a value in eeprom using write command but unable to read that. While executing the code getting the error....
root@rb-imx6ul:~# python3 read_eeprom
read the register from: 51
Traceback (most recent call last):
File "read_eeprom", line 10, in <module>
d = x.readReg(reg)
File "/usr/lib/python3.5/site-packages/mraa.py", line 549, in readReg
return _mraa.I2c_readReg(self, reg)
ValueError: Unknown error in I2c::readReg()
why this error please let me know....???