Skip to content

BNO055 not working with iMX I2C #3763

Closed
@grjohn14

Description

@grjohn14

Trying to mount an sd card or just a small test on bno055 as below both report: OSError: [Errno 5] Input/output error

code used:

import time
import board
import busio
import adafruit_bno055
 
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_bno055.BNO055_I2C(i2c)
 
while True:
    print("Temperature: {} degrees C".format(sensor.temperature))
    print("Accelerometer (m/s^2): {}".format(sensor.acceleration))
    print("Magnetometer (microteslas): {}".format(sensor.magnetic))
    print("Gyroscope (rad/sec): {}".format(sensor.gyro))
    print("Euler angle: {}".format(sensor.euler))
    print("Quaternion: {}".format(sensor.quaternion))
    print("Linear acceleration (m/s^2): {}".format(sensor.linear_acceleration))
    print("Gravity (m/s^2): {}".format(sensor.gravity))
    print()
 
    time.sleep(1)

Full error for bno055:

Traceback (most recent call last):
  File "code.py", line 17, in <module>
  File "adafruit_bno055.py", line 385, in magnetic
  File "adafruit_bno055.py", line 141, in __get__
  File "adafruit_register/i2c_struct.py", line 59, in __get__
  File "adafruit_register/i2c_struct.py", line 59, in __get__
  File "adafruit_bus_device/i2c_device.py", line 143, in write_then_readinto
OSError: [Errno 5] Input/output error

Using code for SD card from this:
https://learn.adafruit.com/adafruit-microsd-spi-sdio/adafruit-circuitpython-sd

Full error for SD card:
common_hal_busio_spi_read: status 400
Traceback (most recent call last):
File "code.py", line 24, in
File "adafruit_sdcard.py", line 116, in init
File "adafruit_sdcard.py", line 177, in _init_card
File "adafruit_sdcard.py", line 160, in _init_card
File "adafruit_sdcard.py", line 274, in _cmd
OSError: [Errno 5] Input/output error

Could be related to a similar problem with ESP32 -S2:
#3396

Any input greatly appreciated.

  • George

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmimxrt10xxiMX RT based boards such as Teensy 4.x

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions