I am using pin number 27 and 28 on Jetson Nano and cannot read data via i2c. I have checked that the device I am connecting is working on Arduino and the data is okay.
I have tried to use smbus and busio (busio actually found the device on 0x2d) but then this error always comes:
Traceback (most recent call last): File "sm.py", line 11, in <module> bearing = bearing255() File "sm.py", line 7, in bearing255 bear = bus.read_byte_data(address,5) IOError: [Errno 110] Connection timed out
This is my code:
import smbus bus = smbus.SMBus(0) address = 0x2d while True: bear = bus.read_byte_data(address, 5) print bear
Also, when I type
sudo i2cdetect -y -r 0
I can see the device at 0x2d but when I type that command again, it gets stuck at that address and I have to reset the connected device.