pimoroni / icm20948-python

Python library for the Pimoroni ICM20948 breakout
https://shop.pimoroni.com/products/icm20948
MIT License
50 stars 22 forks source link

OSError: [Errno 121] Remote I/O error #3

Closed chalgand closed 5 years ago

chalgand commented 5 years ago

I'm trying to use your module on raspberry pi 3b+ under Raspbian Buster with desktop !

I obtain : OSError: [Errno 121] Remote I/O error

Vin = 5V GND = GND 1V8 = 1V8 SDA = SDA SCL = SCL

imu = ICM20948(i2c_addr=0x68)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.venv/jns/lib/python3.7/site-packages/icm20948/__init__.py", line 227, in __init__
    self.write(ICM20948_PWR_MGMT_1, 0x01)
  File "/home/pi/.venv/jns/lib/python3.7/site-packages/icm20948/__init__.py", line 61, in write
    self._bus.write_byte_data(self._addr, reg, value)
OSError: [Errno 121] Remote I/O error
>>> exit()
(jns) pi@raspberrypi:~/Desktop/centrale $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
(jns) pi@raspberrypi:~/Desktop/centrale $ 

Best Regards

chalgand commented 5 years ago

I'm sorry. The problem became from the power supply (1V8)...

Thanks for your works

Your : time.sleep(0.0001) at line at line 67 is not used ! https://github.com/pimoroni/icm20948-python/blob/master/library/icm20948/__init__.py