Very simple Intervalometer for G12 needed - Script Writing - CHDK Forum supplierdeeply

Very simple Intervalometer for G12 needed

  • 4 Replies
  • 4797 Views
Very simple Intervalometer for G12 needed
« on: 07 / March / 2011, 23:53:14 »
Advertisements
I use to have Allbest(?) intervalometer script that worked fantastic on my A640. That camera is toast so I now have a Canon G12 and I'm looking for a comparable script. Very simply a script that will follow my camera's settings for ISO/exposure/Fstop and just basically activate the shutter nonstop till the battery is dead or memory is full.

I've tried a few scripts such as skywalker9's Selective Intervalometer but the clock is not something I can work with. I need the script to run nonstop forever just activating the shutter.

*

Offline zeno

  • *****
  • 891
Re: Very simple Intervalometer for G12 needed
« Reply #1 on: 08 / March / 2011, 04:08:30 »
Try this:
Code: [Select]
@title Simple Intervalometer
@param i Interval (Secs)
@default i 5
@param d Delay before start (Secs)
@default d 2

sleep 1000*d
while 1
   shoot
   sleep i*1000
wend
end
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Very simple Intervalometer for G12 needed
« Reply #2 on: 08 / March / 2011, 11:06:08 »
I use to have Allbest(?) intervalometer script that worked fantastic on my A640. That camera is toast so I now have a Canon G12 and I'm looking for a comparable script. Very simply a script that will follow my camera's settings for ISO/exposure/Fstop and just basically activate the shutter nonstop till the battery is dead or memory is full.

I've tried a few scripts such as skywalker9's Selective Intervalometer but the clock is not something I can work with. I need the script to run nonstop forever just activating the shutter.
I know how frustrating it can be when a script has more features than you really need. I stripped down the Selective Intervalometer script to what I think you might like. Although @zeno's script is probably the shortest code that will do what you mentioned, I thought you might still like the ability to "fine tune" the intervals time as well as have the ability to set a start hour and minute. After that, the script will run until there's no more space or battery power to take shots <OR> you press the shutter button to stop the script early. The interval time is controlled using tick_count statements rather than the sleep statement, so the intervals will be more reliable.

I just updated the script and added a shot counter for convenience. If you set the number of shots to zero or less than zero, then the script will shoot until the card fills up or the battery runs out. However, there might be simple cases where you might just want to test your script before doing that, so the shot counter will allow you to set the number of shots for the test.

Code: [Select]
rem Author SkyWalker9
@title Basic Intervalometer
@param a Number of Shots (0=max)
@default a 0
@param e Interval (mins)
@default e 5
@param f Interval (secs)
@default f 0
@param p Starting Hour (24 Hr)
@default p 7
@param q Starting Minute
@default q 0

rem ** Caution ** Caution ** Caution ** Caution ** Caution ** Caution ** Caution **
rem This script has the ability to run non-stop; once started it can be set to run until the
rem camera runs out of space for photos or until the battery power is no longer
rem sufficient to continue.
rem ** Caution ** Caution ** Caution ** Caution ** Caution ** Caution ** Caution **

rem Check input variables for proper values
  if a<=0 then a=999999
  if e<0 then e=0
  if e>59 then e=59
  if f<0 then f=0
  if f>59 then f=59
  if p<0 then p=0
  if p>23 then p=23
  if q<0 then q=0
  if q>59 then q=59

rem Next statement combines "hour" and "minutes" (hour:11 minute:30 = 1130)
rem to keep wait_loop intervals VERY accurate
  P=p*100+q

rem Calculate user specified cycle/interval time in ms
  d=(e*600+f*10)*100
  if d<1 then d=1

rem delay of 1 second (1000 ms) to allow camera vibrations to stop
  sleep 1000

  n=1
  cls
  if a<>999999 then print "Number of shots: "a
  print "Start Time: "p":"q
  print "Intervals: "e"min "f"sec"
  print " "
  print "Waiting for Start Time..."

:check_time
  F=get_time 2
  Q=get_time 1
  F=F*100+Q
  if F>=P then goto "shot_loop"
  goto "check_time"

:shot_loop
    b=get_tick_count
    shoot
    sleep 600
    n=n+1
    if n>a then goto "done"
    cls
    if a<>999999 then print "Next shot: "n" of "a else print "Next shot: "n
    print "Intervals: "e"min "f"sec"
    print " "
    S=b+d
:wait_loop
    b=get_tick_count
    if b<S then goto "wait_loop"
    goto "shot_loop"
:done
end
« Last Edit: 08 / March / 2011, 18:47:36 by SkyWalker9 »

Re: Very simple Intervalometer for G12 needed
« Reply #3 on: 18 / March / 2011, 20:27:38 »
Oh man you guys are awesome. Thanks a ton I'll give this a spin this weekend.


*

Offline adid1

  • *
  • 11
Re: Very simple Intervalometer for G12 needed
« Reply #4 on: 29 / May / 2011, 09:10:43 »
Hi, I'm a novice with CHDK and I just found a 256MB card to try this script with my new G12.
It worked fine but I wonder how I can get the LCD to be off once the script started? Does each frame has it's own EV if I'm on P mode? Tnx
just my G12

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal