How to flash a light on ardupilot?

I am using matek h743. I have a servo tool with light dependent resistor. Hence to activate it I need to flash a light. How can I do it? I nees to switch it on my RC

Maybe use a camera trigger output?

1 Like

Hi, thank you for your answer. Could you pls provide a small example or link to article. I have very small expeeience

https://ardupilot.org/copter/docs/common-camera-controls.html

and
https://ardupilot.org/dev/docs/mavlink-camera.html

1 Like

Thank you very much. Will try

Lua scripts can also control LEDs. We have some examples in this directory although they may not be exactly what you’re looking for. I’m also not sure if the Matek H743 can run scripting although with an H7 it should have enough CPU and memory.

3 Likes

Thank you, will try lua scripts. If I find a solution will post it here

if you just need to switch it from RC then you could just use the relay output with a small LED attached.

1 Like

Thank you, but how it should control it? As a servo? I dont know how to configure mission planner. It shoukd just turn on when I pull RC trigger

https://ardupilot.org/copter/docs/common-relay.html

If it’s just a single 3 or 5mm led you need to operate, then you should be able to run it right from the pin without any more hardware.

Thank you very much, will try

Do you just need to be able to switch it on and off, or do you need to flash any kind of pattern? if its just on/off then relay output will work fine but if you need any complex outputs like flashing patterns then LUA would be the way to do it.

1 Like

I just need turn it on and off

I have found in matek h743 v3 slim documentation a Relay section here https://www.mateksys.com/?portfolio=h743-slim#tab-id-6 however I am not quite understand which pin should act as a relay. Could you please check ?

look at the ardupilot mapping tab, it will show you what gpio pin drives connects to what servo output. so servo out 12 would be GPIO61, you would set `SERVO12_FUNCTION to -1 to enable GPIO then set relay1 pin to 61, reboot the flight controller and you can then test it from mission planner relay tab. once its working set a rc function to 28 to be able to switch relay1.

2 Likes