# Betaflight Instructions

## Connection to the Flight Controller

If your FC is flashed with Betaflight:

1. Power your board
2. Open <https://app.betaflight.com/> in Chrome or Edge.
3. Click on Connect

<figure><img src="/files/Eyz2QGXiCprkQ2WBFOzJ" alt=""><figcaption></figcaption></figure>

## Building Firmware

See the official [Betaflight documentation](https://betaflight.com/docs/development/building/Building-in-Ubuntu) for setting up the development environment.\
\
Build the ARK FPV firmware:

If you flash your Flight controller using DFU via <https://app.betaflight.com/> , build the `.hex`

```
make hex CONFIG=ARK_FPV
```

If you flash your Flight controller using ST-Link, build the `.bin`

```
make binary CONFIG=ARK_FPV
```

## Flashing Firmware

#### Flash using DFU mode via web app

Betaflight can be flashed using DFU over USB C.

1. With the board unpowered, hold the button next to the USB C port while connecting the USB cable to your PC.
2. Open <https://app.betaflight.com/> in Chrome or Edge.
3. Select `Firmware Flasher`\
   Toggle the sliders `Enable Expert Mode` and `Show release candidates` and select:\
   \- `Development`\
   \- `ARK_FPV`\
   \- `4.6.0-dev [latest]`\
   ![](/files/mGIbeGz0isGjzdSdEf3W)
4. Now select the `Load Firmware [Online]`\
   ![](/files/krIUQYGjlVfksNElNWff)
5. You could also flash your own build\
   \- Select the `Load Firmware [Local]`\
   \- In this case you need a `.hex`\
   ![](/files/Y07qdF5Za82tITEWBYIP)<br>
6. Now select `Flash Firmware`

{% hint style="info" %}
Betaflight does not have a separate bootloader. If you want to re-flash back to PX4 or Ardupilot after flashing Betaflight, you will need to re-flash the PX4 bootloader.
{% endhint %}

#### Flash using ST-Link

For detailed instructions on ST-LINK setup, software installation, and usage, see the [ST-LINK Flashing Guide](/knowledge-base/knowledge-base/st-link-flashing-guide.md).

Connect to the 6-pin debug connector and flash:

```
st-flash write obj/ARK_FPV.bin 0x08000000
```


---

# 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.arkelectron.com/products/flight-controller/ark-fpv/betaflight-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.
