Seagull#REC Camera Controller Lua 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.

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

Seagull Camera Controller Script.

Download https://www.dropbox.com/s/q8p3csjphcp7rj9/Seagul%20v2%20zoom.lua?dl=0

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

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 https://ardupilot.org/copter/docs/common-lua-scripts.html

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.

I hope this helps to make Herelink more integrated with some camera systems

7 Likes

Love it!

1 Like

um, uh, wow!

1 Like

Thank you Ian,fantastic a great help yo many

yes!!! definitely gonna try this now.

I do hope your doing a video on this one. Lol I followed along but it’s always nice to see it done. And I’ve never done a script before. My current build with the herelink is my deepest endeavor into arducoptor. I was going to see if there was a way to map the buttons to change the scroll wheel function so somthing like pressing button B changed the wheel to zoom function, this might be easier. Thanks for the work you have done already.

1 Like

hmmm

thanks so much in advance.

having two questions

  1. where can I find the camera trigger script?

01.07.2020 01:03:14 : Lua: No scripts to run
;(

The script must be run on latest Master and not current beta build. What firmware you using ?

Ah okay
Thanks.

How do I select the latest master firmware for installation?

Arducopter 4.0.3
Ffd08628

Should it Work?

You need to download these manually from the downloads section on Ardupilot however these should be classed at mission stable builds or used in Mission critical environment.

The full support will come in the futures in public releases

https://firmware.ardupilot.org/

1 Like

Thanks for the information.
I am quite new to ardupilot!

regards
Chris

Hi,

so I am on 4.04 Beta
still no lua script running?

Why?
I really need to get work done.
Please someone help me.

I’ve been worrying about this little thing for weeks.

Ot won’t work with the Beta either as the changes are much newer than that. You need to look at the daily or master builds on the link I shared.

Just to be clear though these would not be classed as stable as could have any number of unknown issues.

Hi,

just to be sure.

Would it work with this build for my cube orange?

https://firmware.ardupilot.org/Copter/latest/CubeOrange/

Best regars
Chris

Yep that’s the latest.

Hi.
You mention that the script only runs with the Master release of ardupilot. There seems to be 3 versions, beta, stable and latest. Which one do you mean?

Latest release.

1 Like

works for me now!
thanks again

MadRC, thanks for the info on the release differences.
I have a Hex using a BlackCube and I see in there is Latest firmware versions listed for BlackCube and BlackCube+.
Anyone know the difference between the two?