# 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   |


---

# 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.swyftrobotics.com/electronics/swyft-ranger/setup-guide.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.
