# Configuring the 9-Axis IMU

{% hint style="info" %}
To use the 9-Axis IMU the Control Hub must be running Robot Controller App v10.0 or newer.
{% endhint %}

{% hint style="success" %}
[A full configuration walkthrough is available here.](https://docs.revrobotics.com/duo-control/hello-robot-blocks/configuration)
{% endhint %}

The 9-Axis IMU is configured similar to other I2C devices. First, navigate to the Control Hub Portal or Expansion Hub where it is connected in the configuration menu.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FlIw1jlNk3xD1W3IBGZsJ%2Fimage.png?alt=media&#x26;token=5a010d4b-0beb-4459-9640-2acbbd006418" alt=""><figcaption><p>Configuration menu on the Driver Hub</p></figcaption></figure>

Next, scroll to find the option to add something to the I2C Bus. **Note:** The internal IMU appears in I2C Bus 0. For this example, we are adding the 9-Axis IMU to I2C Bus 1.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FIJsTu4Rn2CQRfmnhGKHA%2Fimage.png?alt=media&#x26;token=531f9d97-a93d-4886-83f2-d879412c96d4" alt=""><figcaption><p>I2C Bus options in the configuration menu</p></figcaption></figure>

Once in the menu, click "Add". This will show the option to add a new sensor to this I2C Bus.&#x20;

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FrwiW8gPmoAKeMVASzJ19%2Fimage.png?alt=media&#x26;token=bd564269-514c-4cf2-b8ec-8080bfdd67fc" alt=""><figcaption><p>Option to add a new I2C device to the bus</p></figcaption></figure>

Scroll to select the REV 9-Axis IMU from the dropdown menu.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FUjqgFltEuHYFGiWUQaOo%2Fimage.png?alt=media&#x26;token=97a86853-a414-493a-9d11-449f9bb45177" alt=""><figcaption><p>9-Axis IMU within the available dropdown menu</p></figcaption></figure>

Name the IMU something relevant that will be easy to identify later. Remember the built-in IMU, if applicable, may also appear as an option while programming.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FEpLWcbma9pQJ5uq4Ln8b%2Fimage.png?alt=media&#x26;token=465b8098-42ff-482d-8263-ca87a8f29d77" alt=""><figcaption><p>Naming the IMU to identify it while programming</p></figcaption></figure>

Finally, select "Done" and complete the remainder of your configuration process.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FAwqFfmwSIWKaTBq8wpRi%2Fimage.png?alt=media&#x26;token=d81b8dca-2f54-4fdf-9e08-c76c0d482e6c" alt=""><figcaption><p>The "Done" option will save the added sensor</p></figcaption></figure>

### **9-Axis IMU in Blocks**

Once configured, the 9-Axis IMU will appear as an option under "Sensors" in the Blocks menu.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FeeWjQK38cBEVEWnshoNi%2Fimage.png?alt=media&#x26;token=9f59f79c-8d5c-4ea5-b066-c86ce9a03c85" alt=""><figcaption><p>The IMU listing in the Blocks side menu</p></figcaption></figure>

When calling the IMU, the configured 9-Axis IMU will appear as the assigned name in the dropdown option on the individual block.

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FMU6nxAGhLLEk4QjXkPU4%2Fimage.png?alt=media&#x26;token=cf1f9b6d-f787-45a0-9116-65f62cee89af" alt=""><figcaption><p>IMU selection dropdown</p></figcaption></figure>

### 9-Axis IMU in OnBot Java

When "Setup Code for Configured Hardware" is checked while creating a new OpMode in OnBot Java, the IMU will automatically be added to the hardwareMap using the assigned name from configuration.

An internal IMU, if applicable, will retain its default name based on the version of IMU (BNO055 or BHI260AP).

<figure><img src="https://1166281274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-ME3KPEhFI6-MDoP9nZD%2Fuploads%2FyRGCSPF4hhWas84j6dqi%2Fimage.png?alt=media&#x26;token=91dc5671-e050-449f-9b6c-7884c7185c62" alt=""><figcaption><p>The configured IMU appearing in OnBot's hardwareMap</p></figcaption></figure>
