# ADIS16470

{% hint style="warning" %}
Keep your robot still at startup EVERY TIME with this gyroscope.
{% endhint %}

## Documentation

{% embed url="<https://wiki.analog.com/first/adis16470_imu_frc>" %}
Official documentation
{% endembed %}

{% embed url="<https://docs.wpilib.org/en/stable/docs/software/hardware-apis/sensors/gyros-software.html#adis16470>" %}
WPILib documentation
{% endembed %}

<figure><img src="https://567506766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F754c0Fpq8fBi6k4ByS1k%2Fuploads%2FsZzdki0RXBhnzFVpPCeS%2Fimage.png?alt=media&#x26;token=bfb13f39-771c-4c41-bf6a-9b5375dbfb84" alt=""><figcaption></figcaption></figure>

The ADIS16470 is a 3-axis gyroscope meaning it must be parallel to the earth for it to work!

## YAGSL Checklist

* [ ] Ensure the ADIS16470 is attached to the roboRIO firmly.
* [ ] The roboRIO is centered on the robot.
* [ ] The roboRIO is flat parallel to the earth.
* [ ] The robot DOES NOT MOVE AT ALL on startup for at least 10 seconds!

## Communication

The ADIS16470 attaches directly to the SPI port on the roboRIO and is only connectable via there with YAGSL.

## Example `swervedrive.json`

<pre class="language-json"><code class="lang-json">{
  "imu": {
    "type": <a data-footnote-ref href="#user-content-fn-1">"adis16470"</a>,
    "id": <a data-footnote-ref href="#user-content-fn-2">0</a>,
    "canbus": <a data-footnote-ref href="#user-content-fn-3">null</a>
  },
  "invertedIMU": <a data-footnote-ref href="#user-content-fn-4">false</a>,
  "modules": [
    "frontleft.json",
    "frontright.json",
    "backleft.json",
    "backright.json"
  ]
}
</code></pre>

[^1]: Select the `adis16470` gyroscope as the primary gyroscope.

[^2]: ID is not relevant for the NavX so `0` is chosen arbitrarily.

[^3]: The `canbus` is not relavent for the NavX so `null` ensures nothing is set in the configuration.

[^4]: Reads default counterclockwise
