@title gentled chdk2 script for video and photo shooting rem author Dave Mitchell - dave@zenonic.demon.co.uk rem this script lets a Gentled CHDK2 use two servo channels to take either videos or photos rem in video mode moving joystick 1 up starts a video, moving it up again stops the video. rem NOTE: This script will only work on an A570 camera with Dave Mitchell's modified Allbest build @param v Photo = 0 Video = 1 @default v 0 if v<0 then v=0 if v>1 then v=1 while 1 do a = get_usb_power until a>0 if a <=4 then gosub "ch1up" else if a <=7 then gosub "ch1mid" else if a <=10 then gosub "ch1down" else if a <=13 then gosub "ch2up" else if a <=16 then gosub "ch2mid" else if a <=19 then gosub "ch2down" else print "error" endif wend end :ch1up if v = 0 then gosub "takephoto" else gosub "startstopvideo" endif return :takephoto print "take photo" shoot return :startstopvideo print "start/stop video" press "shoot_full" sleep 250 release "shoot_full" return :ch1mid print "channel 1 middle" return :ch1down print "channel 1 down" return :ch2up print "take videos" press "dm_movie" v = 1 return :ch2mid print "channel 2 middle" return :ch2down print "take photos" release "dm_movie" v = 0 return