Skip to content

can't convert I2C to int #3

@Entretoize

Description

@Entretoize

I tried your port and receive an error I don't understand:

Traceback (most recent call last):
  File "<stdin>", line 81, in <module>
  File "MPU6050RPI.py", line 98, in __init__
TypeError: can't convert I2C to int

To get this error I just added from MPU6050RPI import MPU6050 to my code. If I add the mpu = MPU6050(... I get:

Traceback (most recent call last):
  File "<stdin>", line 32, in <module>
  File "MPU6050RPI.py", line 100, in __init__
  File "MPU6050RPI.py", line 213, in set_clock_source
  File "MPU6050RPI.py", line 143, in write_bits
  File "usmbus.py", line 29, in read_byte_data
OSError: [Errno 5] EIO

Also I don't understand where to define the pins...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions