CHDK Wiki
Register
(Adding categories)
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Video:Countdown Intervalometer in action|480px|A screengrab of the Countdown Intervalometer in action.]]
 
[[Video:Countdown Intervalometer in action|480px|A screengrab of the Countdown Intervalometer in action.]]
  +
==About the Script==
 
Countdown Intervalometer is an easy to use intervalometer script for CHDK. This script should work with most Canon cameras that run CHDK. Special care was taken to avoid using PROPCASE features that would cause compatibility problems with some cameras. This script was created by [mailto:andrew@andrewhazelden.com Andrew Hazelden].
   
 
Note: If you want to record longer timelapse sequences with your Canon Powershot camera you should look into getting an external wall power module. It is also possible to buy / make a larger external battery pack that will power your camera for days.
   
 
==Download==
Countdown Intervalometer is an easy to use intervalometer script for CHDK. This script should work with most Canon cameras that run CHDK. Special care was taken to avoid using PROPCASE features that would cause compatibility problems with some cameras.
 
 
Download the Countdown Intervalometer script:
 
[http://www.andrewhazelden.com/projects/CHDK/CHDK_Countdown_Intervalometer.zip CHDK_Countdown_Intervalometer.zip]
  +
 
==Support==
 
You can join the discussion on the Countdown Intervalometer script on the developer's [http://www.andrewhazelden.com/blog/2010/09/ubasic-countdown-intervalometer-script-for-canon-powershots-running-chdk/ Countdown Intervalometer blog page].
   
Note: If you want to record longer timelapse sequences with your Canon Powershot camera you should look into getting an external wall power module. It is also possible to buy / make a larger external battery pack that will power your camera for days.
 
 
==Steps to Load the Script==
 
==Steps to Load the Script==
 
1. Copy the file counter.bas to your CHDK/SCRIPTS folder on your SD memory card.
 
1. Copy the file counter.bas to your CHDK/SCRIPTS folder on your SD memory card.
Line 10: Line 17:
 
2. Turn on your camera.
 
2. Turn on your camera.
   
3. Load up the CHDK menu and then select “Scripting parameters”.
+
3. Load up the CHDK menu and then select '''Scripting parameters'''.
   
4. In the Script Menu open the uBASIC script count.bas by selecting “Load script from file…”.
+
4. In the Script Menu open the uBASIC script '''counter.bas''' by selecting '''Load script from file…'''
   
 
5. Set the parameters for your time-lapse in the script menu.
 
5. Set the parameters for your time-lapse in the script menu.
Line 37: Line 44:
 
[[File:Countdown.jpg|Countdown Intervalometer Running]]
 
[[File:Countdown.jpg|Countdown Intervalometer Running]]
   
  +
==Getting Longer Camera Runtime==
==Version History==
 
  +
If you want to run your Canon Powershot camera for a longer duration you can purchase an external power module (Like the Canon ACK-DC 10) for your camera that usually comes in the form of a "dummy battery" that goes in the camera and a wall power supply.
Version 1.0 Sept 16, 2010.
 
Created by Andrew Hazelden [mailto:andrewhazelden@gmail.com andrewhazelden@gmail.com]
 
   
  +
Another option is to insert the Canon Powershot video output cord into the camera's AV port. This will disable the LCD screen and save battery power.
Version 1.1 updated Sept 19, 2010.
 
Added the perpetual intervalometer mode.
 
   
 
==Version History==
   
 
'''Version 1.0''' - Created Sept 16, 2010.
==Download==
 
  +
*Original script released on CHDK forum by [mailto:andrew@andrewhazelden.com Andrew Hazelden].
   
 
'''Version 1.1'''- Created Sept 19, 2010.
Download the Countdown Intervalometer script:
 
 
*Added the perpetual intervalometer mode.
[http://www.andrewhazelden.com/files/2010/September/CHDK_Countdown_Intervalometer.zip CHDK_Countdown_Intervalometer.zip]
 
==Support==
 
You can join the discussion on the Countdown Intervalometer script on the developer's [http://www.andrewhazelden.com/blog/2010/09/ubasic-countdown-intervalometer-script-for-canon-powershots-running-chdk/ Countdown Intervalometer blog page].
 
   
==Source Code==
+
==Source Code - counter.bas==
   
 
rem Countdown Intervalometer v1.1
 
rem Countdown Intervalometer v1.1

Revision as of 12:18, 21 April 2014

480px|A screengrab of the Countdown Intervalometer in action.

About the Script

Countdown Intervalometer is an easy to use intervalometer script for CHDK. This script should work with most Canon cameras that run CHDK. Special care was taken to avoid using PROPCASE features that would cause compatibility problems with some cameras. This script was created by Andrew Hazelden.

Note: If you want to record longer timelapse sequences with your Canon Powershot camera you should look into getting an external wall power module. It is also possible to buy / make a larger external battery pack that will power your camera for days.

Download

Download the Countdown Intervalometer script: CHDK_Countdown_Intervalometer.zip

Support

You can join the discussion on the Countdown Intervalometer script on the developer's Countdown Intervalometer blog page.

Steps to Load the Script

1. Copy the file counter.bas to your CHDK/SCRIPTS folder on your SD memory card.

2. Turn on your camera.

3. Load up the CHDK menu and then select Scripting parameters.

4. In the Script Menu open the uBASIC script counter.bas by selecting Load script from file…

5. Set the parameters for your time-lapse in the script menu.

6. Close the CHDK menus. With ALT mode active press the shutter button to start running the script. After the first photo is taken, the estimated time remaining will be displayed.

7. To stop running the script press the shutter button again then turn off ALT mode.

When the script finishes you will see the following printed on the display:

Sequence Completed
10 Shots Taken in:
00:01:07 HH:MM:SS
*** FINISHED ***
Countdown Intervalometer>

In the CHDK Script menu there are two parameters you can change. The first is Interval in Sec and the second is Number of Shots. If you want to take pictures forever, or until your memory card is full set Number of Shots to zero.

If you want to take pictures as fast as possible set the camera to continuous photo mode and set the Interval in Sec parameter to zero.

Countdown Intervalometer Screenshots

Script Menu


Countdown Intervalometer Running

Getting Longer Camera Runtime

If you want to run your Canon Powershot camera for a longer duration you can purchase an external power module (Like the Canon ACK-DC 10) for your camera that usually comes in the form of a "dummy battery" that goes in the camera and a wall power supply.

Another option is to insert the Canon Powershot video output cord into the camera's AV port. This will disable the LCD screen and save battery power.

Version History

Version 1.0 - Created Sept 16, 2010.

Version 1.1- Created Sept 19, 2010.

  • Added the perpetual intervalometer mode.

Source Code - counter.bas

rem Countdown Intervalometer v1.1
rem An intervalometer script that will take a specific number of photos.
rem 
rem If the Number of Shots is set to zero the intervalometer switches from
rem a countdown intervalometer mode over to a perpetual intervalometer mode
rem that will continue to take photos until your memory card is full or your
rem camera's battery runs out of power.
rem 
rem Version 1.1 updated Sept 19, 2010.
rem Added the perpetual intervalometer mode.
rem 
rem Version 1.0 Created by Andrew Hazelden on Sept 16, 2010.
rem 
rem E-mail: andrewhazelden@gmail.com   Blog: www.andrewhazelden.com
rem 
rem To download the latest version check out this blog post:
rem http://www.andrewhazelden.com/blog/2010/09/ubasic-countdown-intervalometer-script-for-canon-powershots-running-chdk/

@title Countdown Intervalometer

rem i is the interval between photos in seconds.
@param i Interval in Sec
@default i 10

rem n is the number of shots to take.
@param n Number of Shots
@default n 99

rem e is elapsed photos taken.
e=0

rem r is the number of shots remaining.
r=n

rem get timelapse start time in ms
z=get_tick_count

rem q is photo time elapsed temp counter in ms
rem v is actual time per photo in ms

rem check for perpetual photo mode if Number of Shots equals zero.
if n=0 then gosub "perpetual"
if n>0 then gosub "countdown"


rem get end time using
x=get_tick_count


rem calculate total timelapse duration
p = (x-z)/1000


rem print total timelapse duration

rem s is seconds elapsed
s=(p)%60

rem m is minutes elapsed
m=((p)/60)%60

rem h is hours elapsed
h=(p)/3600

cls
print "Sequence Complete."
print e, "Shots Taken in:"
print h;":";m;":";s, "HH:MM:SS"
end





:remaining
rem time remaining subroutine

rem s is seconds remaining
s=((v/1000)*r)%60

rem m is minutes remaining
m=(((v/1000)*r)/60)%60

rem h is hours remaining
h=((v/1000)*r)/3600

print "Est. Time Remaining:"
print h;":";m;":";s, "HH:MM:SS"

return



:perpetual
rem perpertual intervalometer mode

rem run the while loop forever.
while 1
	
	shoot
	rem increase elapsed photo counter
	e=e+1
	
	cls
	print "Shot:", e
	
	rem interval between photos delay
	sleep i*1000
	
wend

return




:countdown
rem countdown intervalometer mode

rem run the while loop until there are no shots remaining.
while r
	rem get the start time for this shot
    q = get_tick_count
	shoot
	
	rem increase elapsed photo counter
	e=e+1
	
	rem decrease shots remaining counter
	r=r-1
	
	cls
	print "Shot:", e, " of ", n 
	
	rem If we are beyond the 1st shot call the "remaining" subroutine
	rem to display the time remaining.
	if e>1 then gosub "remaining"
	
	rem interval between photos delay
	if r>0 then sleep i*1000
	
	rem calculate time between photos in ms
	v=get_tick_count-q
	
wend

return