
File init.py has an extra period inside the script
It only works for me when I rewrite the code like this:
from mpu6050 import mpu6050
Before this I was receiving the following message:
Traceback (most recent call last):
File "/home/labgnss/imu_project/mpu_6050_ex3.py", line 6, in
mpu6050 = mpu6050.mpu6050(0x68)
^^^^^^^^^^^^^^^
AttributeError: type object 'mpu6050' has no attribute 'mpu6050'
File init.py has an extra period inside the script
It only works for me when I rewrite the code like this:
from mpu6050 import mpu6050
Before this I was receiving the following message:
Traceback (most recent call last):
File "/home/labgnss/imu_project/mpu_6050_ex3.py", line 6, in
mpu6050 = mpu6050.mpu6050(0x68)
^^^^^^^^^^^^^^^
AttributeError: type object 'mpu6050' has no attribute 'mpu6050'