Some commands seem unknown to my A590 IS using the latest CHDK Autobuild, and I thought I'd ask for the latest version before I go on to debug the code.
Ultimately, I'm looking for a script that would be triggered by the gent360-CHDK USB pulse and not an intervalometer.
My question will make obvious my status as a CHDK neophyte, but for starters, how, where does one enter the script commands- do this, go .....? Thanks for any help Paul
Assuming you have loaded CHDK successfully into the camera:
remove the SD card from the camera, make sure it's writable, and place it in your computer.
copy the script file into the SD card "CHDK\SCRIPTS" directory. (simple sample script.)
remove the SD card from the computer, lock it, and place it in your Canon camera.
press the "Print" button on the camera (otherwise known as the ALT key in CHDK). Press the "FUNC. SET" button. You will now be presented with the "Script" menu in CHDK. Equivalent to ALT-MENU, then "Scripting parameters".
Choose "Load script from file..." and select the ".bas" sample script you have put into the SD card.
and it goes down hill from there onwards. Enjoy unlimited possibilities!
Hussam, The Windwatcher KAP CHDK scripts have been tested successfully with the Canon A570IS, A590IS and the G9.
The the KAP scripts were written for auto KAP with flexible options for intervalometer (triggering the shutter every X seconds), zoom brackets, exposure brackets, file format (raw, jpg and dual file capture) as well as switching between still photos and video mode while in flight.
The scripts are not set up as is to support external triggers of the shutter (for example gent360-CHDK USB device).
Simple modification of the scripts to include the command as indicated by pitprops ( s_key k "remote" followed by if k=1 then shoot in a loop) which will wait for brief voltage to pass from the external trigger device to the camera where the above loop will detect the voltage change and trigger the shutter).
Paul, it can take a bit of work to get the CHDK stuff running (but well worth (the mostly one time effort)).
a simple question, I'm new to CHDK and I'm trying to get over the first hurdles. The default script keeps running despite my setting it to repeat 0 times, I'd have pulled my hair out if I had any.
On this page http://stereo.jpn.org/eng/sdm/ubasic.htm of SDM uBasic commands, it says :-
'wait_for_switch_press'
"Script pauses until voltage signal present on USB V+ pin. See the various examples above. Signal can be from a switch, IR or wireless receiver, microcontroller, etc."
You need to put 'set_sync 0 0 0 0' at the start of the script to turn-off synchronised-shooting mode.
Hi WindWatcher, Sorry for this kind of newbie question... (in fact I'm a newbie regarding CHDK/SDM)...
I'm checking your script to see if I can use it with a Canon A470 that I borrowed. I'm familiar with C/Perl/Expect/ssh scripting so the programing part shouldn't be an issue. Could you please explain me a little further how do you make the exposure bracketing? Because I can see the call to the shoot_bracket subroutine (detail below) in the main loop but I can't see where you change the EV seetings... Am I missing something? Is some setting being assumed that should be done in the config menu?
:shoot_bracket for n=1 to f sleep 100 shoot sleep 1200 next n return
I believe the last posted script is incomplete, that's why Wind Watcher suggested I read the entire thread.
If you look at the first script posted there, bracketing was achieved by clicking the "erase" button followed by the "right" or "left" buttons (depending on which way you want to bracket). In particular, look at the :bracketing and :pbracket subroutines.
Per your question on the WW CHDK KAP script related to the exposure bracket, see details below. But first a few basics. The CHDK scripts basically control the camera by simulating button presses (as noted by Hussam above). I recommend the following: First get familiar with your camera. Play with the buttons manually on your camera and work out the sequence (and write the down on paper) of button pushes required to change exposure both down (- EV) and up (+ EV). The WW KAP scripts simulate the button pushes (both - EV and + EV). Also note there are several versions of the WW KAP scripts. Some have exposure bracket code - some do not. Recommend reviewing the entire thread and note the name of the WW KAP scripts as well as the comment section (the lines that start with "rem" for remarks that are just comments and are not executed). The code below is not a full WW KAP script and will not execute by itself, just an example of the code segment for EV bracket control. Hope this helps. Keep patient. If new to CHDK recommend reading the wiki and the long post with a cold beer or some hot tea....enjoy.
WW
***********************EXAMPLE CODE for Exposure Bracket**************
:shoot_bracket shoot sleep 1500 rem test for Ev bracket off if f<1 then return if c=0 then click "left" sleep 400 for n=1 to f click "left" sleep 400 next n shoot sleep 1500 if c=0 then click "left" sleep 400 for n=1 to f click "left" sleep 400 next n shoot sleep 1500 if c=0 then click "right" sleep 400 for n=1 to 2*f click "right" sleep 400 next n return
Thanks WindWatcher!! I thought you were changing the EV by other means. Below you can see the script I was working on (that is the same as yours but for the A470). In particular I found out that the A470 needs a little longer sleeps (600ms) to work fine, otherwise it gets in the wrong menu line. I'll keep you updated on my progress. Thanks again to you and Dave for the incredible emulator. Regards Ramiro ------------------------------------------------------------------------------------------------------------------------------ rem Written for A470 rem version 12 @title KAP 12 @param a Delay 1st Shot (Mins) @default a 0 @param b Delay 1st Shot (Secs) @default b 10 @param c Number of Shots @default c 5 @param d Interval (Minutes) @default d 0 @param e Interval (Seconds) @default e 5 @param g Number of Brackets (odd number) @default g 3 @param h Ev+/- (Thirds) @default h 3
rem -------------------------------------------------- set_sync 0 0 0 0 set_raw 0
p=a*60000+b*1000 t=d*60000+e*1000 x=0 rem y is the cursor position in the EV menu y=0 if c < 1 then let c=5 if t < 100 then let t=100 if g < 1 then let g=1 if h < 1 then let h=1 print "Ready to launch..." sleep p print "Starting secuence..." for n=1 to c let x =((g-1)/2) for m=-x to x gosub "ev_bracket" gosub "focus_shoot" next m print "Sleep..." sleep t next n end
:focus_shoot print "Shot", n, "of", c, "EV", m press "shoot_half" print "Focus..." sleep 2000 press "shoot_full" release "shoot_full" return
:ev_bracket sleep 2000 print "m-> ", m, "y->", y if m < y then let r=y let s=m else let r=m let s=y endif click "set" sleep 600 click "down" sleep 600 while s < r print "s-> ", s, "r->", r for z=1 to h if m < y then click "left" else click "right" sleep 600 next z let s=s+1 wend let y=m click "up" sleep 600 click "set" sleep 2000 return