bno055.connectors.i2c module

class bno055.connectors.i2c.I2C(node: rclpy.node.Node, i2c_bus=0, i2c_addr=40)

Bases: Connector

Connector implementation for I2C connection to the sensor.

CONNECTIONTYPE_I2C = 'i2c'
connect()

Connect to the sensor

Returns:

read(reg_addr, length)

Read data from sensor via I2C.

Parameters:
  • reg_addr – The register address

  • length – The data length

Returns:

write(reg_addr, length, data: bytes)

Write data to sensor via I2C.

Parameters:
  • reg_addr – The register address

  • length – The data length

  • data – data to transmit

Returns: