# EasySwerve Software

## Code Template

| [Java EasySwerve Template](https://github.com/REVrobotics/EasySwerve-Java-Template) |
| ----------------------------------------------------------------------------------- |
| [C++ EasySwerve Template](https://github.com/REVrobotics/EasySwerve-Cpp-Template)   |

## Steering Encoder Calibration

1. Verify you have completely assembled your MAXSwerve or EasySwerve Module and have the Steering Motor’s SPARK Flex or SPARK MAX connected to the Module's Through Bore Encoder
2. ​[Install and open the latest version of the REV Hardware Client](https://docs.revrobotics.com/rev-hardware-client/gs/install)
3. Connect the Steering Motor’s SPARK Motor Controller directly to your computer via the included USB-C to USB-A cable
4. Select the Steering SPARK from the list of Connected Devices and navigate to the **Update Tab** to verify your Firmware is up to date.
5. Ensure the Steering SPARK is still selected, and then navigate to **Absolute Encoder** under the **Utilities Tab**.

   <figure><img src="https://2800450911-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4vnkeyE3Rv32OmveFas2%2Fuploads%2FsjUMd0YyJ2z2073R0RBW%2FAbsoluteEncoder-Utilities-01.png?alt=media&#x26;token=db13b722-9f50-4552-8837-46f19924f94d" alt=""><figcaption></figcaption></figure>
6. Insert a 1/8in or 3mm Hex Key into the calibration on the top of the EasySwerve Module. You will feel the Hex Key reach the azimuth gear inside of the top cover.

   <figure><img src="https://2800450911-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4vnkeyE3Rv32OmveFas2%2Fuploads%2FbPHIJTane3OVHS6c6fgL%2FCalibration.png?alt=media&#x26;token=522f0a8f-4fc6-4a70-bc78-4cd3a7da43c3" alt="" width="375"><figcaption></figcaption></figure>
7. Rotate the module's wheel manually while applying light pressure to the hex key until it slots into the alignment pocket. The Hex key will travel about 1/4in further into the swerve module when it has aligned.

   <figure><img src="https://2800450911-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4vnkeyE3Rv32OmveFas2%2Fuploads%2F2vY6m0omsEN9nhJEhxN2%2FEasySwerveCalibration.gif?alt=media&#x26;token=2ad53500-83f2-4512-a6d4-4f7e87e5daf3" alt=""><figcaption></figcaption></figure>
8. Click the Set Zero Offset button to calibrate the zero-position of the absolute encoder to this position.

<figure><img src="https://2800450911-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4vnkeyE3Rv32OmveFas2%2Fuploads%2FLtjGF4REbpadj49PzU8m%2FAbsoluteEncoder-Utilities-02.png?alt=media&#x26;token=1ef342ce-1c90-425d-869d-2464bfb41902" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revrobotics.com/ion-build/easyswerve/sw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
