-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
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:
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels