Automatically turn on lights at night?

Sorry for a newbie question:

I am building an autonomous boat and I would like to have running lights (LEDs) on at night to minimize accidents. Of course I could build a separate timer- or sensor-solution for this, but to simplify the solutions and save power I was wondering if I can do this from the Pixhawk?

Is there a way to turn on a LED at night automatically from pixhawk? (e.g. via aux and a relay or led driver-board)

For example at specific times of day? Or by using a light sensor? Or maybe at specific intervalls from boot up?

You should use a lua script that uses the time of the day to control a relay or a RCservo output. No need to change the C++ code at all.

1 Like

An option that isn’t quite what you are asking would be to turn the light on during an Auto Mission. You could use a CONDITION_DELAY before a DO_SET_RELAY command anywhere during the mission.

1 Like