> For the complete documentation index, see [llms.txt](https://aedrox.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aedrox.gitbook.io/docs/flight-controller/interactive-blocks/ardupilot/servos-relays.md).

# Servos / Relays

## 1. SERVOs

#### RGB Led&#x20;

The RGB LED pad is a servo output (SERVO9). By default it is set to be used as RGB LED (120)[^1]. **SERVO9\_FUNCTION** can be modified to be used to something else (eg: to control a servo motor)

#### Motors 1  to 8. (SERVO1\_  to SERVO8\_)

Motors are defined automaticaly by your FRAME\_TYPE and or FRAME\_CLASS.\
If not used for the motors (eg: Quad drone) the motors 5 to 8 can be used to other purposes (eg: to control a servo motor) by defining a specific **SERVOx\_FUNCTION** :&#x20;

Exemple : SERVO5\_FUNCTION : 29   (To control a retractable landing gear)

{% hint style="info" %}
SERVOx\_FUNCTION can be modified on this page  :  SETUP > Mandatory Harware > Servo Output\
But the CONFIG > Full Parameter List gives more options
{% endhint %}

<figure><img src="/files/9riGjtuBK2IIdxpPY2tz" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more informations on SERVOn\_FUNCTIONS, visit this [Ardupilot Wiki page](https://ardupilot.org/copter/docs/common-rcoutput-mapping.html)
{% endhint %}

***

## 2. RELAYs

General Purpose Input/Outputs (GPIOs) are used in ArduPilot for control of relays, actuators, LEDs, camera triggers, Start Button etc

#### GPIO1  (Relay1)

**RELAY1\_FUNCTION :** 1 \
**RELAY1\_PIN :** 81

#### GPIO2 (Relay4)

**RELAY4\_FUNCTION :** 1 \
**RELAY4\_PIN :** 82

#### VTX Power (Relay2)

**RELAY2\_FUNCTION :** 1 \
**RELAY2\_PIN :** 83\
This relay activate the flight controller 10V power supply. \
Low = Off. / High = On

#### Camera Switch (Relay3)

**RELAY3\_FUNCTION :** 1 \
**RELAY3\_PIN :** 84\
This relay activate the built in camera switch. \
Low = CAM1  / High = CAM2

{% hint style="info" %}
RELAYx\_DEFAULT : 0/1  (This paramater define the default state of relays : 0 = low / 1 = high)
{% endhint %}

### REMOTE CONTROL RELAYS

ALL relays can be remotely controlled. By setting the appropriate **RCx\_OPTION :** \
28 : Relay1\
34 : Relay2\
35 : Relay3\
36 : Relay4\
\
The 'x' should correspond to the remote channel number.\
Exemple : RC7\_OPTION : 34  -   Use CH7 of the transmitter to switch the 10V power supply on/off.

{% hint style="info" %}
SERVOs and RELAYs can be tested by using the Mission Planner virtual buttons Tab.
{% endhint %}

<figure><img src="/files/1ncANSQXetXR6oTEClGM" alt=""><figcaption></figcaption></figure>

[^1]:


---

# 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://aedrox.gitbook.io/docs/flight-controller/interactive-blocks/ardupilot/servos-relays.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.
