Simple relay control

How do I make a simple relay control in 4.5?

I have a signal (its a switch on my remote) on RC5 how do I configure it to control a output example M6 on my CUAV X7+ autopilot?

The output M6 should pull to GND so it can trigger my relay.

I don’t get it to work and all info online is for version 4.2 where configs where differently.

https://ardupilot.org/copter/docs/common-cuav-x7-family-overview.html

set SERVO6_FUNCTION to -1 to use M6 as GPIO. M6 should be pin 55, so set RELAY1_FUNCTION to 1 (Relay), RELAY1_PIN to 55 and RELAY1_DEFAULT to 0 so its default state is off. Lastly, set RC5_OPTION to 28 (Relay 1 on/off).

All of this information is available in the documentation. :slight_smile: