Hi,
I am facing a similar issue, I recently purchased the GrovePi+ and hooked it up to my Raspberry Pi 2. Initial set-up seemed to work fine. I hooked up a grove 3-axis accelerometer (v1.1 produced by seeedstudio).
The sensor was detected running sudo i2cdetect -y 1 …
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – 04 – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- 4c – -- –
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --
I can also read values back with the following code…
import time
from grovepi import *
while True:
try:
accl = acc_xyz() # Get the value from the accelerometer
print "\nX:",accl[0],"\tY:",accl[1],"\tZ:",accl[2],
time.sleep(.1)
except KeyboardInterrupt: # Stop the buzzer before stopping
break
except (IOError,TypeError) as e:
print "Error"
However when I try to run the python script adx1345.py under ~/GrovePi/Software/Python/grove_accelerometer_16g I get the following error…
Traceback (most recent call last):
File “adxl345.py”, line 105, in <module>
adxl345 = ADXL345()
File “adxl345.py”, line 47, in init
self.setBandwidthRate(BW_RATE_100HZ)
File “adxl345.py”, line 55, in setBandwidthRate
bus.write_byte_data(self.address, BW_RATE, rate_flag)
IOError: [Errno 5] Input/output error
Any advice how to fix this problem… ?