> For the complete documentation index, see [llms.txt](https://teravolt.gitbook.io/teravolt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://teravolt.gitbook.io/teravolt/flight-controllers/aeroh7-fpv/ardupilot-setup.md).

# Ardupilot Setup

## ArduPilot

ArduPilot is the primary and fully supported firmware for AeroH7-FPV. The following covers initial setup through Mission Planner.

***

### 1. Flash Firmware

1. Connect AeroH7-FPV to your computer via USB-C.
2. Open Mission Planner and go to **Setup → Install Firmware**.
3. Select the correct vehicle type (Copter, Plane, or Rover).
4. Click **Load custom firmware** and select the AeroH7-FPV `.apj` file, or select the board from the list if it appears.
5. Wait for the flash to complete and the board to reboot.

{% hint style="warning" %}
Do not disconnect the USB cable during firmware flashing. A failed flash may require manual DFU recovery.
{% endhint %}

***

### 2. Sensor Calibration

After flashing, navigate to **Setup → Mandatory Hardware** and complete the following in order:

* **Accelerometer Calibration** — Follow the six-position calibration wizard.
* **Compass Calibration** — Rotate the aircraft through all axes. The onboard IST8310 will calibrate automatically. If using an external compass on I²C2, ensure it is set as the primary compass in **COMPASS\_PRIMARY**.
* **Radio Calibration** — Move all transmitter sticks and switches to their full extents.
* **ESC Calibration** — Follow the ESC calibration procedure for your ESC type.

***

### 3. IMU Configuration

AeroH7-FPV carries two ICM-42688-P IMUs on independent SPI buses. ArduPilot uses both by default.

* Navigate to **Config → Full Parameter List**.
* Confirm `INS_USE = 1` and `INS_USE2 = 1` to enable both IMUs.
* `INS_GYRO_FILTER` — set to 20 Hz as a starting point for multi-rotor; tune down for fixed-wing.

***

### 4. Serial Port Assignment

AeroH7-FPV has 8 serial ports. Assign functions in **Config → Full Parameter List** using the `SERIALx_PROTOCOL` parameters.

| Parameter         | Port   | Recommended Use                  |
| ----------------- | ------ | -------------------------------- |
| SERIAL0\_PROTOCOL | USB    | MAVLink (Mission Planner)        |
| SERIAL1\_PROTOCOL | USART1 | Telemetry 1 (GCS / companion)    |
| SERIAL2\_PROTOCOL | USART2 | Telemetry 2 / flow control radio |
| SERIAL3\_PROTOCOL | USART3 | GPS                              |
| SERIAL4\_PROTOCOL | UART4  | User defined                     |
| SERIAL5\_PROTOCOL | UART5  | User defined                     |
| SERIAL6\_PROTOCOL | USART6 | RC input (CRSF/ELRS)             |
| SERIAL7\_PROTOCOL | UART7  | User defined                     |
| SERIAL8\_PROTOCOL | UART8  | User defined                     |

{% hint style="info" %}
For USART2 and USART3 with hardware flow control (RTS/CTS), set `SERIAL1_OPTIONS = 0` and ensure the connected radio module's RTS/CTS lines are cross-wired: FC RTS → module CTS, FC CTS → module RTS.
{% endhint %}

***

### 5. CAN Bus Configuration

1. Navigate to **Config → Full Parameter List**.
2. Set `CAN_P1_DRIVER = 1` to enable CAN1. Set `CAN_P2_DRIVER = 1` to enable CAN2.
3. Set `CAN_D1_PROTOCOL = 1` (DroneCAN) for standard CAN peripherals.
4. Reboot the board and navigate to **Setup → Optional Hardware → DroneCAN** to scan and configure connected CAN devices.

***

### 6. Power Monitor Setup

1. Go to **Setup → Mandatory Hardware → Battery Monitor**.
2. Set **Monitor** to **Analog Voltage and Current**.
3. Connect a compatible power module to the power connector.
4. Set the voltage divider and current sensor scale values matching your power module datasheet.

***

### 7. SD Card Logging

AeroH7-FPV uses a MicroSD card for onboard data logging.

* Insert a MicroSD card (FAT32 formatted, Class 10 or faster recommended).
* In **Config → Full Parameter List**, set `LOG_BACKEND_TYPE = 1` (File) to enable SD card logging.
* Set `LOG_DISARMED = 0` to log only when armed, or `1` to log continuously.

***

### 8. OSD Configuration

1. In Mission Planner, go to **Config → OSD**.
2. Enable OSD output and assign the video channel to the MAX7456 / AE7456.
3. Arrange OSD panels — battery voltage, GPS coordinates, altitude, flight mode, and RSSI are recommended as a baseline.

***

### 9. Flight Modes

1. Go to **Setup → Mandatory Hardware → Flight Modes**.
2. Assign modes to your transmitter channel 5 switch positions.
3. Recommended initial modes: Stabilize, AltHold, Loiter, RTL.

***

### 10. Failsafe & Safety

* **Radio Failsafe** — Set `FS_THR_ENABLE = 1` and configure `FS_THR_VALUE` to a value below your minimum throttle PWM.
* **Battery Failsafe** — Configure `BATT_FS_LOW_ACT` and `BATT_FS_CRT_ACT` for low and critical battery actions.
* **Arming Checks** — Review `ARMING_CHECK` bitmask to ensure all required pre-arm checks are active.
* **GeoFence** — Configure `FENCE_ENABLE` and set fence radius and altitude limits before autonomous flight.
