CHDK/uBASIC/Scripts/CanonA640: Lightning

Lightning

 * Written for/on: Canon A640
 * Also works on: Other Canon AXXX (Not tested)

Lightning by Johan Van Barel (http://www.vanbarel.com)

The Canon A640 does not allow to leave the shutter open for longer then 15 seconds. To allow taking pictures of lightning during a longer period then 15 seconds, this script uses the continuous burst drive mode. The burst drive mode will be active for the interval specified. The shutterspeed has to be selected manually first. Best results can be expected at a shutter speed of 1''. So if you select an interval of 1 minute, the script will take as much images as possible with the selected shutter speed.

Documentation/Help (save as a small Lightning.txt" file to your /CHDK/SCRIPTS/ folder)

Select M or Tv mode on your Canon A640 and select your shutter speed (f.i. 1'') Select Continuous Burst Drive Mode in the options menu.

Parameters:


 * Duration (Min)(Default=1)
 * Duration (Sec)(Default=0)

Script Code (save as "Lightning.bas" to your /CHDK/SCRIPTS/ folder)

rem Johan Van Barel 07-07-2007 rem Lightning for Canon A640

@title Lightning (Set Tv + BurstDrive) @param a Duration (Min) @default a 1 @param b Duration (Sec) @default b 0 rem @param c Shutter rem @default c 0

t=60000*a+1000*b if t<1000 then let t=1000

sleep 500

rem set_tv c press "shoot_half" sleep 1000 press "shoot_full" print "Burst",a;"Min",b;"Sec" sleep t release "shoot_full" release "shoot_half"

end