My tweaked Ultra Intervalometer (v1.02) - Script Writing - CHDK Forum  

My tweaked Ultra Intervalometer (v1.02)

  • 14 Replies

Offline Joshatdot

  • *
  • 20
  • A720 & A570 w/latest Autobuild
    • Joshatdot's Photobucket
My tweaked Ultra Intervalometer (v1.02)
« on: 18 / November / 2008, 03:50:12 »
I was using Keoeeit's Ultra Intervalometer script, and it wasn't performing how I wanted it to be, so I edited & tweaked it some.

First, it was not shooting the 1st image when shooting X amount of pictures.  Then in endless mode, I didn't like how the display output was working.

Variable j is for keeping track of the number of shots taken in Endless mode.  I wasn't sure what letter to use for that variable, so I picked first initial of my name.

Works on my A720 IS and A570 IS.

Anywho, here is my edited version and would like your input

edit: attached is my script also

Code: [Select]
rem Author - Keoeeit (edited by Joshatdot)
rem Written for S-Series
rem Should be okay on others
rem Use Endless mode with caution
rem See documentation for important info
@title Ultra Intervalometer v1.02
@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 6
@param d Interval (Minutes)
@default d 0
@param e Interval (Seconds)
@default e 10
@param f Interval (10th Seconds)
@default f 0
@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
let j=1

if g=1 then goto "endtitle" else goto "start"

  print "Endless Mode"
  print "(use with caution)"
  goto "endless"

  print "Shot", j, "every " d":"e
  sleep t
  goto "endless"

  print "1 Cycle Time:", y/60000; "min", y%60000/1000; "sec"
  goto "interval"

  if p>0 then gosub "pause"
  print "Shot 1 of", c
  for n=2 to c
  sleep t
  print "Shot", n, "of", c
  next n
  if g=1 then goto "interval" else end

  for m=1 to n
  print "Intvl Begins:", q/60; "min", q%60; "sec"
  sleep 930
  next m
« Last Edit: 06 / May / 2010, 12:07:56 by Joshatdot »


Offline Joshatdot

  • *
  • 20
  • A720 & A570 w/latest Autobuild
    • Joshatdot's Photobucket
Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #1 on: 18 / November / 2008, 22:45:51 »
One thing I've noticed, when shooting in Endless mode & you have Delay 1st Shot (in mins or secs), it always includes that delay on every shot.  So say if you have 1st shot delay 5 seconds, and have the script take a picture every 30 seconds, every shot will be 35 seconds.

I tried some things to eliminate that, but I do not know enuff about scripting to fix it.

Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #2 on: 19 / November / 2008, 12:14:42 »
I think it was done that way to make the script more adaptable to many needs. The delay to first shot being used as your interval between shots if used in endless mode. You don't need to select how many shots will be taken when it is endless, so just choose 1 shot per interval. The rest of the parameters are then used to take a numbered sequence of shots after each first-shot delay. I think I read something about that in the instructions to use it. Makes it more adaptable to a wider variety of interval shooting types.

Single delays between single frames when using endless mode and delay to first shot as your interval. Would be like ... pause ... shoot ... pause ... shoot ...

Long single delay before a sequence of timed frames. Normal usage when not in endless mode. Or can be repeated endlessly. Would be like ... pause .... shoot.. shoot.. shoot.. ... pause ... shoot.. shoot.. shoot.. ...



Offline Joshatdot

  • *
  • 20
  • A720 & A570 w/latest Autobuild
    • Joshatdot's Photobucket
Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #3 on: 21 / November / 2008, 03:49:17 »
I kinda figured that.  I used the original script to make a 10+ hour time lapse (shot every 1 min) from my window, shooting the street & neighbors.  It would have been longer, but batteries ran out.

Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #4 on: 23 / November / 2008, 13:51:58 »
Hi - I was glad to see your post, as I use an A720IS too. I tried using Keoeeit's Ultra Intervalometer script but couldn't get it to work at all (including with some A720IS-specific tweaks suggested by Maka45 as posted at UBASIC/Scripts: Ultra Intervalometer - CHDK Wiki). I would only get the following:

uBasic:1 unk stmt

I deleted my previous ult_intrvl script and created one using the script you posted above but I get the same error message. I've looked in the CHDK forum to see if someone else has asked this already, but I'm coming up empty handed. Do you have any ideas on what I might be doing wrong? Or how I can troubleshoot this? Any thoughts would be much appreciated.

Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #5 on: 31 / December / 2008, 11:07:45 »

I'm new to this too, but here is what I found with the same error. I did a cut and paste on my Mac of the script for motion detect, copied it to my SD card and tried to run it only to get a parse err in the third line, which was a remark line. So, I had a look at the text with a hex editor and found that my Mac would use a line feed (LF) (hex 0A) at the end of each line of text, while the pasted code had a carriage return (CR) (hex 0D).

So, using the hex editor's find/replace function, I replaced all the x0D's with x0A's, copied the code to the SD card and tried it -- and it worked just fine!

It seems that PCs use CR to delineate the end of a line, while Macs and Unix/Linux use LF, and older Macs use CR/LF! It seems to me that the basic script failing with the CR should be a major problem to all the PC users out there, but it doesn't seem to be. Maybe someone can explain that to me.

In an ideal world, the SHDK basic interpreter would use CR, LF, and CR/LF all as acceptable end of line indicators.



Offline reyalp

  • ******
  • 11924
Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #6 on: 31 / December / 2008, 17:30:05 »
CHDK already accepts LF and CRLF. CR only is native for pre-OSX macs, DOS text mode is CRLF.
Don't forget what the H stands for.

Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #7 on: 12 / January / 2009, 06:20:46 »
I ran this script last night on my A550. I had it set to take 96 pictures with a 5 minute interval.I was using 2500 Mah Ni-MH batteries

It took 14 pictures. When I turned it on it said to change the batteries. Now, no matter what batteries I put in, it may show 91%, 94% whatever and as soon as I switch from review to camera the percentage dorps down in the 40s and it says to change the batteries. It does this even if I don't have CHDK on my memory card.

Did I break my camera?  :'(

I had used this script successfully with shorter intervals.

Battery MAX voltage is set it 2000, MIN voltage is  set at 2100 Step sizes is set to ON=25. These are the settings that have been set all along.

The batteries in it now show 2.660 volts when I turn it on, drops down to 2.5xx or 2.4xx volts volts and shuts down when I switch to camera. I take one photo and it shuts down.
« Last Edit: 12 / January / 2009, 06:36:51 by darwin-t »


Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #8 on: 12 / January / 2009, 07:24:49 »
Why is your MAX voltage set lower than your MIN voltage ?

AFAIK, normally you should set the MAX voltage to whatever a freshly charged set produces,
and the minimum to the shutdown or batt low warning voltage ...


edit: ... so I don't think your cam is broken; if above doesn't fix it maybe your batteries are, though
« Last Edit: 12 / January / 2009, 07:48:54 by whim »

Re: My tweaked Ultra Intervalometer (v1.02)
« Reply #9 on: 13 / January / 2009, 06:36:11 »
I guess max was set at 2800. It's so hard to read that little screen. When I adjusted it I figured it out. I tried several sets of rechargeable batteries and finally found a set that works. I'm going to get a power supply before I try any more long term time lapses.

Thanks for the reply


Related Topics