Skip to content

viam-modules/tdk-invensense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This tdk-invensense module implements a tdk-invensense mpu6050 movement_sensor, a combination gyroscope and accelerometer, using the rdk:component:movement_sensor API.

Configure your mpu6050 movement_sensor

Note

Before configuring your movement_sensor, you must create a machine.

Navigate to the CONFIGURE tab of your machine in the Viam app. Add movement_sensor / tdk-invensense:mpu6050 to your machine.

On the new component panel, copy and paste the following attribute template into your movement_sensor's attributes field:

{
    "i2c_bus": "<your-i2c-bus-index-on-board>",
    "use_alt_i2c_address": <boolean>
}

Attributes

The following attributes are available for viam:tdk-invensense:mpu6050 movement_sensors:

Attribute Type Required? Description
i2c_bus string Required The index of the I2C bus on the board that your movement sensor is wired to.
use_alt_i2c_address boolean Optional Depends on whether you wire AD0 low (leaving the default address of 0x68) or high (making the address 0x69). If high, set true. If low, set false.
Default: false

Example configuration

viam:tdk-invensense:mpu6050

  {
      "name": "<your-tdk-invensense-mpu6050-movement_sensor-name>",
      "model": "viam:tdk-invensense:mpu6050",
      "type": "movement_sensor",
      "namespace": "rdk",
      "attributes": {
          "i2c_bus": "1"
      },
      "depends_on": []
  }

Next Steps

  • To test your movement_sensor, expand the TEST section of its configuration pane or go to the CONTROL tab.
  • To write code against your movement_sensor, use one of the available SDKs.
  • To view examples using a movement_sensor component, explore these tutorials.