We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traceback (most recent call last): File "sensor.py", line 3, in mpu = mpu6050(0x68) TypeError: 'module' object is not callable
my code:
from mpu6050 import mpu6050 import time mpu = mpu6050(0x68) while True: print("Temp : "+str(mpu.get_temp())) print() accel_data = mpu.get_accel_data() print("Acc X : "+str(accel_data['x'])) print("Acc Y : "+str(accel_data['y'])) print("Acc Z : "+str(accel_data['z'])) print() gyro_data = mpu.get_gyro_data() print("Gyro X : "+str(gyro_data['x'])) print("Gyro Y : "+str(gyro_data['y'])) print("Gyro Z : "+str(gyro_data['z'])) print() print("-------------------------------") time.sleep(1)
The text was updated successfully, but these errors were encountered:
I am using the same code and get the same error when trying to run in python3.
if i try to run in python i get
Traceback (most recent call last): File "6050.py", line 3, in mpu = mpu6050(0x68) File "/home/pi/.local/lib/python2.7/site-packages/mpu6050/mpu6050.py", line 60, in init self.bus.write_byte_data(self.address, self.PWR_MGMT_1, 0x00) IOError: [Errno 121] Remote I/O error
Sorry, something went wrong.
No branches or pull requests
python3 sensor.py
Traceback (most recent call last):
File "sensor.py", line 3, in
mpu = mpu6050(0x68)
TypeError: 'module' object is not callable
my code:
The text was updated successfully, but these errors were encountered: