improvement to ultra intervalometer - Script Writing - CHDK Forum

improvement to ultra intervalometer

  • 1 Replies
improvement to ultra intervalometer
« on: 13 / November / 2009, 10:43:38 »
Hi... I'm obviously new, but I now have some experience with CHDK and I'm an experience programmer, though not in basic.   :P

I was playing around with the ultra intervalometer, but it didn't quite do what I wanted.  One of its features is that it refocuses on every shot.  I didn't want this, as it slows down the interval and uses more battery.  The best I could get out of it on a G9 was about one shot every 1.5 seconds (perhaps worse, I didn't measure it, but it was at least that slow).

I wanted it to focus on the first shot, and fire away on all subsequent shots, which gets me up to one shot every 0.7 seconds (can't seem to go any faster than that on the G9 --- it's "busy...")

So, here's the code.  Have fun!

(not sure what the rules are for crediting the original author, but I left it in)

Code: [Select]
rem Author - Keoeeit, Modified - rott                 
rem Written for S-Series                 
rem Should be okay on others                 
rem Use Endless mode with caution                 
rem See documentation for important info                 
rem first version                 
@title Ultra Intervalometer No Focus                   
@param a Delay 1st Shot (Mins)                 
@default a 0                 
@param b Delay 1st Shot (Secs)                 
@default b 0                 
@param c Number of Shots                 
@default c 5                 
@param d Interval (Minutes)                 
@default d 0                 
@param e Interval (Seconds)                 
@default e 0                 
@param f Interval (10th Seconds)                 
@default f 5                 
@param g Endless? No=0 Yes=1                 
@default g 0                 
if c<1 then let c=5                 
if t<100 then let t=100                 
if g<0 then let g=0                 
if g>1 then let g=1                 
if p<0 then let p=0                 
print "1 Cycle Time:", y/60000; "min", y%60000/1000; "sec"                 
goto "interval"                 
  if p>0 then gosub "pause"                 
  print "Shot 1 of", c                 
  rem lock focus and exposure on first shot
  press "shoot_half"
  sleep 500
  if c=1 then
    click "shoot_full"
    release "shoot_half"
  goto "shootloop"
  for n=2 to c                 
  sleep t                 
  print "Shot", n, "of", c                 
  click "shoot_full"                 
  next n                 
  if g=1 then
    goto "shootloop"
    release "shoot_half"
  for m=1 to n                 
  print "Intvl Begins:", q/60; "min", q%60; "sec"                 
  sleep 930                 
  next m                 

By the way, it would not be too difficult to build an option into ultra intervalometer script to toggle between the original "focus on every shot" and "focus on first shot only".  I just didn't want the former at all, so I didn't bother.

Re: improvement to ultra intervalometer
« Reply #1 on: 22 / November / 2009, 21:12:48 »
Thanks, I was looking for something like this.  8)

Could you also add the ability to turn off the LCD?  I'm chewing through batteries and have no need for an LCD display.


Related Topics

SimplePortal 2.3.6 © 2008-2014, SimplePortal