> For the complete documentation index, see [llms.txt](https://docs.swyftrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swyftrobotics.com/electronics/swyft-ranger/setup-guide.md).

# 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="/files/tnO7CCng95wO3htK8uIs" 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   |
