Lua script for Landing light

Hi can anyone help me to get some info to integrate landing light for optical flow sensor using Lua script

I don’t think you need a script unless your requirements are very specific.

Use an RC relay like this one to control the light on an autopilot servo channel assigned to the landing gear function (29).
PicoSwitch Radio Controlled Relay Switch (dimensionengineering.com)

Follow the instructions for setting up landing gear (the “gear” in this case is simply your landing light relay):
Landing Gear/ Retractable Camera Mount — Copter documentation (ardupilot.org)

When set up correctly, the landing light will automatically turn on below LGR_DEPLOY_ALT.

2 Likes

Thankyou very much :smiling_face: