> 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-flow-mr/ardupilot-instructions.md).

# Ardupilot Instructions

### Wiring <a href="#wiring" id="wiring"></a>

The ARK Flow MR is connected to the CAN bus using a Pixhawk standard 4 pin JST GH cable. For more information, refer to the [CAN Wiring](https://docs.px4.io/main/en/can/#wiring) instructions.

Multiple sensors can be connected by plugging additional sensors into the ARK Flow MR's second CAN connector.

### Mounting <a href="#mounting" id="mounting"></a>

The recommended mounting orientation is with the connectors on the board pointing towards **back of vehicle**, as shown in the following picture.

![ARK Flow align with Pixhawk](https://docs.px4.io/main/assets/ark_flow_orientation.auMVvxJ0.png)

### Flight Controller Parameters

Connect the ARK Flow MR to the flight controller's CAN port and set the following parameters. Reboot the flight controller after setting them.

#### Required

| Parameter                                                                              | Value | Description              |
| -------------------------------------------------------------------------------------- | ----- | ------------------------ |
| [CAN\_P1\_DRIVER](https://ardupilot.org/copter/docs/parameters.html#can-p1-driver)     | 1     | Enable CAN port 1 driver |
| [CAN\_D1\_PROTOCOL](https://ardupilot.org/copter/docs/parameters.html#can-d1-protocol) | 1     | Set protocol to DroneCAN |
| [FLOW\_TYPE](https://ardupilot.org/copter/docs/parameters.html#flow-type)              | 6     | DroneCAN optical flow    |

#### Optional

To use the onboard lidar:

| Parameter                                                                              | Value       | Description                  |
| -------------------------------------------------------------------------------------- | ----------- | ---------------------------- |
| [RNGFND1\_TYPE](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-type)        | 24          | DroneCAN rangefinder         |
| [RNGFND1\_MAX](https://ardupilot.org/copter/docs/parameters.html#rngfnd1-max)          | 5000        | Maximum range in cm (50 m)   |
| [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    |

To compensate for sensor placement (see [sensor offset compensation](https://ardupilot.org/copter/docs/common-sensor-offset-compensation.html#common-sensor-offset-compensation)):

| Parameter                                                                                                                                                                                                                                  | Description                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
| [FLOW\_POS\_X](https://ardupilot.org/copter/docs/parameters.html#flow-pos-x) / [FLOW\_POS\_Y](https://ardupilot.org/copter/docs/parameters.html#flow-pos-y) / [FLOW\_POS\_Z](https://ardupilot.org/copter/docs/parameters.html#flow-pos-z) | ARK Flow MR offset from the vehicle center of gravity (meters) |

### CAN Node Parameters

Set the following on the sensor and reboot the node. CAN node parameters can be configured using either:

* [QGroundControl](https://docs.px4.io/main/en/dronecan/#qgc-cannode-parameter-configuration) — each CAN node appears as a separate *Component X* entry under **Vehicle Settings > Parameters**.
* 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     |
| `CANNODE_PUB_IMU` | Set to `1` to publish `RawIMU` messages on the CAN bus |

### Additional Notes

* [FlowHold](https://ardupilot.org/copter/docs/flowhold-mode.html#flowhold-mode) does not require the use of a rangefinder.

#### ArduPilot Setup Instructions

{% embed url="<https://ardupilot.org/copter/docs/common-optical-flow-sensor-setup.html>" fullWidth="false" %}
Sensor Setup Instructions
{% endembed %}


---

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

```
GET https://docs.arkelectron.com/products/sensor/ark-flow-mr/ardupilot-instructions.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.
