> 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

## Hardware Setup

### Wiring

**CAN:** connect with a Pixhawk standard 4-pin JST-GH cable. See [CAN Wiring](https://docs.px4.io/main/en/can/#wiring). Chain additional nodes from the second CAN connector.

**UART:** connect the 6-pin UART JST-GH to a free FC serial port. Protocol details: [UART / MAVLink](/products/sensor/ark-dist/uart-mavlink.md).

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

No node parameters are required for range publishing.

Configure optional node params via [QGroundControl](https://docs.px4.io/main/en/dronecan/#qgc-cannode-parameter-configuration) or the [DroneCAN GUI Tool](/knowledge-base/knowledge-base/dronecan-gui-tool-guide.md).

#### Optional

| Parameter      | Description                                        |
| -------------- | -------------------------------------------------- |
| `CANNODE_TERM` | Set to `1` if this is the last node on the CAN bus |

## 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
