I've been working on a script for about a month now that takes in 5 pulses from a microcontroller, each about 1.25s apart. After the camera receives each pulse, it sets predetermined camera settings and takes a picture.
The problem is that the script is Very unreliable. It takes anywhere from 1-5 pictures, usually around 2 or 3. I put the camera in Program and Continuous mode.
Any help at all would be appreciated. I'm thinking about converting the script to LUA to see if it'll improve reliability and speed. I'm using a Powershot A2000 IS. I'm not sure if it's my camera settings (turned flash off) or the script itself.
If you notice any red flags in my code (settings that may be taking a long time to process) or settings that I should make sure my camera is in (so that it doesn't auto-focus or anything), this is what I'm particularly interested in.
Thanks.
@title Penta-Camera Capture
print "@@ Started Script"
n=0
gosub "Setting0"
n=0
while 1
wait_click 1
if is_key "remote" then gosub "SelectOption"
wend
end
:SelectOption
print "Option Select"
if n = 4 then gosub "Capture4"
if n = 3 then gosub "Capture3"
if n = 2 then gosub "Capture2"
if n = 1 then gosub "Capture1"
if n = 0 then gosub "Capture0"
if n = 5 then n = 0
return
:Capture
press "shoot_full"
sleep 20
release "shoot_full"
sleep 150
return
:Capture0
press "shoot_half"
sleep 150
gosub "Capture"
print "Capture 0"
gosub "Setting1"
return
:Capture1
gosub "Capture"
print "Capture 1"
gosub "Setting2"
return
:Capture2
gosub "Capture"
print "Capture 2"
gosub "Setting3"
return
:Capture3
gosub "Capture"
print "Capture 3"
gosub "Setting4"
return
:Capture4
gosub "Capture"
release "shoot_half"
print "Capture 4"
gosub "Setting0"
return
:Setting0
set_zoom 0
set_iso 3
rem set_focus 200
set_av 10
rem set_tv 35
n=5
print "Setting 0 Ready"
return
:Setting1
set_zoom 0
set_iso 4
rem set_focus 300
set_av 17
rem set_tv 35
n=1
print "Setting 1 Ready"
return
:Setting2
set_zoom 0
set_iso 50
rem set_focus 100
set_av 14
rem set_tv 35
print "Setting 2 Ready"
n=2
return
:Setting3
set_zoom 0
set_iso 400
rem set_focus 50
set_av 18
rem set_tv 35
print "Setting 3 Ready"
n=3
return
:Setting4
set_zoom 0
set_iso 200
rem set_focus 500
set_av 9
rem set_tv 35
print "Setting 4 Ready"
n=4
return