# Confusion in the pin shown in blue os

**URL:** <https://discuss.bluerobotics.com/t/confusion-in-the-pin-shown-in-blue-os/16470>\
**Category:** BlueOS\
**Created:** [April 1, 2024, 8:26am UTC](https://discuss.bluerobotics.com/t/confusion-in-the-pin-shown-in-blue-os/16470 "2024-04-01T08:26:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelorisonk](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/angelorisonk/32/12848_2.png) [@angelorisonk](https://discuss.bluerobotics.com/u/angelorisonk)\
**Post date:** [April 1, 2024, 8:26am UTC](https://discuss.bluerobotics.com/t/confusion-in-the-pin-shown-in-blue-os/16470/1 "2024-04-01T08:26:42Z")

</div>

I am attempting to configure a relay to control an LED’s power state (on/off) but am encountering difficulties integrating it with the PWM output in the BlueOS configuration, as I cannot find an option for a relay. Despite this, I’ve learned that it is indeed possible to achieve this setup. Additionally, I am confused about the Pixhawk pin assignments, specifically the documentation mentioning up to pin 16. I’m unclear on how each pin correlates to the respective PWM outputs in the Pixhawk.

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [April 8, 2024, 8:51am UTC](https://discuss.bluerobotics.com/t/confusion-in-the-pin-shown-in-blue-os/16470/3 "2024-04-08T08:51:30Z")

</div>

Hi @angelorisonk,

> [@angelorisonk](#):
>
> I am attempting to configure a relay to control an LED’s power state (on/off) but am encountering difficulties integrating it with the PWM output in the BlueOS configuration, as I cannot find an option for a relay.

PWM is a pulsed signal type, defined by regular pulses of a set duration at a specific frequency. In contrast, a relay-style signal is continuously ON or OFF, and only changes state when manually requested to.

Because of those conceptual differences the ArduPilot implementation treats them as separate functionality, whereby the output pin can _either_ be assigned to a servo/PWM function, or the [`SERVOn_FUNCTION`](https://docs.bluerobotics.com/ardusub-zola/software/autopilot/ArduSub-4.1/developers/parameters/#servon-function-servo-output-function) parameter can be set to `Disabled`, and some other function can be in control of it.

In this case you’re likely looking for the [`RELAY_PIN`](https://docs.bluerobotics.com/ardusub-zola/software/autopilot/ArduSub-4.1/developers/parameters/#relay-pin-first-relay-pin) parameter, which you can set to the pin you’re wanting to use as a relay-style output.

Note that ArduSub currently only has [joystick button options](https://docs.bluerobotics.com/ardusub-zola/software/autopilot/ArduSub-4.1/developers/parameters/#btnn-function-function-for-button) for up to 3 relay pins, even though the firmware itself can support additional relay pin assignments.

> [@angelorisonk](#):
>
> I am confused about the Pixhawk pin assignments, specifically the documentation mentioning up to pin 16. I’m unclear on how each pin correlates to the respective PWM outputs in the Pixhawk.

The Pixhawk has 8 `MAIN` pins and an additional 6 `AUX` (auxiliary) pins. These are controlled by independent chips, and only the AUX pins can be used as relay output, using the `AUXOUT*` values in the `RELAY_PIN` parameters.

I’m unsure which documentation you’re referring to, but most likely it’s intended for our [Navigator](https://bluerobotics.com/store/comm-control-power/control/navigator/) flight controller, which has a single controller for its set of 16 output pins, any of which can be assigned as relay outputs.
