Seagull Camera Trigger Script For Herelink

Off the back of the fantastic work Peter has been doing in Ardu with LUA scripting I have created a script to controls the Seagull#REC with a single button for shutter and record as two buttons for zoom with Herelink from Proficnc and Cubepilot.

The idea of this is to allow users with remotes with out physical switches and have software buttons to control the camera trigger.

With in the script file its self I have added notes and info on how it actually works and what each section does.

Seagull Camera Controller Script.

This Lua script is designed to allow the Herelink to control a Seagull #REC Camera Trigger with less buttons.

Setup of on and off should be done via normal sbus programming of the remote

Specifically it allows you to trigger shutter and start and stop recording on a single button such as the CAM button, It also allows you to zoom in and out via 2 buttons by pressing and holding each way.

The default behaviour is

  • Press & Release CAM = Shutter

  • Press & Hold CAM Recording Start/Stop

  • Press & Hold D = Zoom In

  • Press & Hold C = Zoom Out

Note: Currently at the time of writing copter is in version 4.03 and Plane is 4.05. This script only works with the Master release of Ardupilot at this time. Support in release firmware will come in the future.

This script requires the use of 4 unused sbus channels for its configuration, sbus channels 12,13,14,15 on bus 1 must be kept free for this script’s use.

To Use

1: Install Master version of Ardupilot on your Autopilot

2: Enable Scripting Set SCR_ENABLE to 1

3: Upload script to the Script folder, see below for more info

4: Configure your Herelink as follows via Herelink Settings and Buttons

Note: The actual PWM values are not specifically important other than they must be below 1500pwm and over 1501pwm when changing state.

5: Connect Seagull~REC to your Autopilot via the chosen ports and set these to script 1 and script 2 in Mission Planner. My advice is

Servo 7 Script 1 - Seagull Port 1 Photo & Record

Servo 8 Script 2 - Seagull Port 2 Zoom

How It works

On a single press of the button set to ch14 the script 1 output will go to 1330pwm for about 2.5s to trigger the camera shutter then returns back to 1500.

On press and hold ie long press of the button of channel 15 the script output 1 will go to 1800pwm to start recording on the camera, this stays at that value until it’s pressed and held again to stop recording.

Buttons assigned to ch12 & 13 will zoom in and out with script 2.

The Script
Seagul v2 zoom.lua (5.7 KB)


Hi Ian ,
Running script in quad 4.15 . I just use the script 2 for zoom with a litle more ms . Must be in documented scripts
Thanks .