micropython-IMU / micropython-mpu9x50

Drivers for InvenSense inertial measurement units MPU9250, MPU9150, MPU6050
MIT License
259 stars 81 forks source link

imu.py: Cant convert str to int #22

Closed Bugsia closed 3 years ago

Bugsia commented 3 years ago

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 commented 3 years ago

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