# Setup Guide

{% embed url="<https://youtu.be/k3f1OKrnicI?si=9mlX7Us37fI5SNp2>" %}
Getting Started Guide
{% endembed %}

## Wiring Guide

{% tabs %}
{% tab title="FTC" %}
Connect Ranger to your Control Hub / Expansion Hub with a 4-pin JST-PH to 4-pin JST-PH cable.&#x20;

Connect Ranger to an Analog port if you will be using 15°/20°/27° modes.&#x20;

Connect Ranger to a Digital port if you will be using DETECT mode.
{% endtab %}

{% tab title="FRC" %}
Connect Ranger to your RoboRio using a 4-pin JST-PH to 3-pin Dupont cable.

{% hint style="warning" %}
Be sure to check your cable: The RoboRio pinout does not match Ranger's pinout pin-for-pin!
{% endhint %}

Connect Ranger to an Analog In port if you will be using 15°/20°/27° modes.&#x20;

Connect Ranger to a DIO port if you will be using DETECT mode.
{% endtab %}
{% endtabs %}

<figure><img src="https://2077255985-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff3ImPfkFpnqdF29DR8Vv%2Fuploads%2FBFgoB4Gls7GMVtK6VTZ6%2Franger_diagram.svg?alt=media&#x26;token=6d2b36e7-2079-439c-a40a-954e2e07c46d" alt="" width="375"><figcaption></figcaption></figure>

## Configuring Ranger

There are two switches on Ranger. These two switches are used to determine which mode Ranger is in.

{% hint style="info" %}
The mode is locked once Ranger is powered on, if you need to change the mode, disconnect power, change the mode, then reconnect power.
{% endhint %}

A switch state of 0 means the switch is closer towards the sensor, and 1 means it is farther from the sensor.

Below is a table of switch states and their corresponding mode, this information is also listed on the case:

| Left Switch State | Right Switch State | Mode Selected |
| ----------------- | ------------------ | ------------- |
| 0                 | 0                  | 20° FOV Mode  |
| 0                 | 1                  | 15° FOV Mode  |
| 1                 | 0                  | 27° FOV Mode  |
| 1                 | 1                  | DETECT Mode   |
