m-rtijn / mpu6050

A Python module for accessing the MPU-6050 digital accelerometer and gyroscope on a Raspberry Pi.
MIT License
296 stars 145 forks source link

AttributeError: 'int' object has no attribute 'read_i2c_word' #25

Closed vinayb1012 closed 5 years ago

vinayb1012 commented 5 years ago

sensor = mpu6050(0x68)

Running this gives the following error - Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.5/dist-packages/mpu6050/mpu6050.py", line 139, in get_accel_data x = self.read_i2c_word(self.ACCEL_XOUT0) AttributeError: 'int' object has no attribute 'read_i2c_word'

m-rtijn commented 5 years ago

Hey @vinayb1012, could you maybe give some more context? On which platform are you running the code? Which exact version of python? How did you install the mpu6050 package? What is the exact code you are executing?