Skip to content

imu.py: Cant convert str to int #22

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

Closed
Bugsia opened this issue Jun 1, 2021 · 1 comment
Closed

imu.py: Cant convert str to int #22

Bugsia opened this issue Jun 1, 2021 · 1 comment

Comments

@Bugsia
Copy link

Bugsia commented Jun 1, 2021

Hello,

I try to use the MP6050 with the Pico so I use the file "imu.py", which i renamend to "mpu6050.py" on my pico.
When I create a new object with: "mpu = MPU6050('x')" I get the error "cant convert str to int" on the 83th line.
When I the use thsi command: "mpu = MPU6050(1)". So I replace the sring with an int, I get the error: "Invalid I2C instance"
What value do I have to enter there?

@peterhinch
Copy link
Contributor

See the docs. The concept of x and y sides applies only to Pyboards. For other targets you must pass an initialised I2C object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants