-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
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
I0Error #15
Comments
Run code with sudo. |
Thank you for using my module! As @Jimit04 stated, you need to run the code using sudo to get access to the I2C bus. |
Thanks for the quick response! I did notice that I didnt do the pip install using sudo (seems like that would need elevated privileges?) so I went back through the whole process using sudo and I got the same error. |
Check if you have enabled I2C with raspi-config. |
There it is! Thanks for the help and the great module! |
No problem. |
Hey, seems like I've gotten the module installed correctly but when trying to run some sample code just to check if it will compile:
`from time import sleep
import RPi.GPIO as GPIO
from mpu6050 import mpu6050
sensor = mpu6050(0x68)
while True:
accel_data = sensor.get_accel_data()
gyro_data = sensor.get_gyrp_data()
temp = sensor.get_temp()
`
I get this error:
Any ideas what that may be referring to / how to fix?
Looking into that directory it seems like all the files are properly placed.
Using Pi 3 if that changes anything.
Thanks!
The text was updated successfully, but these errors were encountered: