> For the complete documentation index, see [llms.txt](https://docs.arkelectron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkelectron.com/products/sensor/ark-dist/ardupilot-instructions.md).

# ArduPilot Instructions

Connect the ARK DIST to the flight controller over CAN or UART as described in [Wiring](/products/sensor/ark-dist/hardware.md#wiring).

See the [ArduPilot rangefinder setup guide](https://ardupilot.org/copter/docs/common-rangefinder-setup.html) for additional configuration guidance.

## CAN Configuration

### Flight Controller Parameters

#### Required

| Parameter                                                                              | Value              | Description                  |
| -------------------------------------------------------------------------------------- | ------------------ | ---------------------------- |
| [RNGFND1\_TYPE](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-type)        | 24                 | DroneCAN                     |
| [RNGFND1\_MAX](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-max)          | *max sensor range* | Range finder maximum range   |
| [RNGFND1\_ADDR](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-addr)        | *sensor ID*        | Sensor ID of the rangefinder |
| [RNGFND1\_RECV\_ID](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-recv-id) | *node ID*          | CAN node ID of the sensor    |

{% hint style="info" %}
If you intend to use multiple distance sensors, you will need [this ArduPilot PR](https://github.com/ArduPilot/ardupilot/pull/31931).
{% endhint %}

### CAN Node Parameters

The node publishes range data with its default parameters. To terminate the bus or change the rangefinder mode and rate, see [Node Parameters](/products/sensor/ark-dist/firmware.md#node-parameters).

## UART/MAVLink Configuration

No parameters need to be set on the ARK DIST. Stock firmware streams MAVLink on the UART port at 115200. See [UART / MAVLink](/products/sensor/ark-dist/uart-mavlink.md).

### Flight Controller Parameters

#### Required

| Parameter                                                                                                          | Value              | Description                |
| ------------------------------------------------------------------------------------------------------------------ | ------------------ | -------------------------- |
| [RNGFND1\_TYPE](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-type)                                    | 10                 | MAVLink                    |
| [RNGFND1\_MAX](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-max)                                      | *max sensor range* | Range finder maximum range |
| [SERIALX\_PROTOCOL](https://ardupilot.org/copter/docs/parameters.html#serial0-protocol-console-protocol-selection) | 2                  | MAVLink2                   |
| [SERIALX\_BAUD](https://ardupilot.org/copter/docs/parameters.html#serial0-baud-serial0-baud-rate)                  | 115                | 115200 baud                |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.arkelectron.com/products/sensor/ark-dist/ardupilot-instructions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
