Hello!
I have rasberry pi 3B+ and grovepi+. I attached a grove i2c motor driver v. 1.3 to my system. If the motor driver is attached, the ultrasonic ranger freezes after every 10th or 20th read.
I tryed various combinations, and there are the same problem with other sensors as well, but this is the main issue.
The same program runs perfectly, if I disconnect the i2c port of the motor driver. If I press the reset button on the motor driver the program starts again well for 10-20 read, then it stops again. It is annoying, because a continuous work is impossible.
Can you, please, help me?
Istvan
This is the failure message I got:
Traceback (most recent call last):
File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 199, in read_i2c_block
data = i2c.read_list(reg = None, len = no_bytes)
File "/usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg/di_i2c.py", line 373, in read_list
return self.transfer(outArr, len)
File "/usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg/di_i2c.py", line 185, in transfer
return_val = self.i2c_bus.transfer(self.address, outArr, inBytes)
File "/usr/local/lib/python3.5/dist-packages/Dexter_AutoDetection_and_I2C_Mutex-0.0.0-py3.5.egg/di_i2c.py", line 475, in transfer
raise IOError("[Errno 5] Input/output error")
OSError: [Errno 5] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Desktop/GrovePi/Software/Python/grove_ultrasonic.py", line 45, in <module>
print(grovepi.ultrasonicRead(ultrasonic_ranger))
File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 269, in ultrasonicRead
number = read_identified_i2c_block(uRead_cmd, no_bytes = 2)
File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 212, in read_identified_i2c_block
data = read_i2c_block(no_bytes + 1)
File "/home/pi/Desktop/GrovePi/Software/Python/grovepi.py", line 205, in read_i2c_block
time.sleep(0.003)
KeyboardInterrupt
>>>