Request: Random Intervalometer - Script Writing - CHDK Forum
supplierdeeply

Request: Random Intervalometer

  • 12 Replies
  • 4898 Views
Request: Random Intervalometer
« on: 11 / August / 2010, 00:14:03 »
Advertisements
I searched all of the forums and didn't find anything similar, however I am quite new to the CHDK community.  Does anyone know of a script that would take random photos within a small set of variables?  I was thinking:

-Delay Start
-Start Time [24 hour]
-End Time [24 hour]
-Number of Pictures
-Repeat Daily [on/off]

Additional features could possibly include variable shutter speed, different randomizers, motion triggering.

Thanks for any input.

Re: Request: Random Intervalometer
« Reply #1 on: 13 / August / 2010, 12:40:38 »
Anyone have any suggestion perhaps for modifying an existing script?  Thanks again.

Re: Request: Random Intervalometer
« Reply #2 on: 13 / August / 2010, 12:54:22 »
Does anyone know of a script that would take random photos within a small set of variables?

Hello and welcome !

Almost certainly not.

I know you want an answer but I am sure most people will be asking themselves 'why would you want to do that ?'

The answer is  ..........   ?


David

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Request: Random Intervalometer
« Reply #3 on: 13 / August / 2010, 20:20:50 »
Anyone have any suggestion perhaps for modifying an existing script?  Thanks again.
I'm not sure if this will help, but in April 2008 there was a posting which provided a script for a pseudo-random sequence of 8 bit numbers that repeats every 256 values (http://chdk.setepontos.com/index.php/topic,1202.msg10978.html#msg10978). I didn't see any feedback on whether it worked.


Re: Request: Random Intervalometer
« Reply #4 on: 13 / August / 2010, 22:20:50 »
Thanks.  I was thinking of doing an 'art' project on the theme of repetition in living.  Basically having 4 or 5 cameras framing areas in my place where the same thing happens over and over.  Waking, cleaning, cooking, doing laundry, at the computer, etc.  I want the camera to shoot at random because within that repetition there is difference.  I'm going to then take small 2"x2" framed prints and create a large mosaic (10' x 10') of a something that represents time passing.  Thats the idea.

I'll have a look at that link.  Thanks for the welcome, and help!
« Last Edit: 14 / August / 2010, 00:02:18 by turnstile »

Re: Request: Random Intervalometer
« Reply #5 on: 17 / August / 2010, 14:35:25 »
Can't seem how to integrate these random number sequence into an intervalometer.  If anyone has experience with modifying scripts any help would be appreciated.

*

Offline reyalp

  • ******
  • 13391
Re: Request: Random Intervalometer
« Reply #6 on: 17 / August / 2010, 14:52:46 »
Can't seem how to integrate these random number sequence into an intervalometer.  If anyone has experience with modifying scripts any help would be appreciated.
There is a random command http://chdk.wikia.com/wiki/CHDK_firmware_usage/MoreBest#changed_RANDOM_command in ubasic, and math.random in lua http://www.lua.org/manual/5.1/manual.html#5.6

You can easily use this to generate a delay in your intervalometer script, e.g

sleep(math.random(5000,10000)) would delay by 5 to 10 seconds in lua.

Note that you'll want to use math.randomseed with some varying value (time, temperature, voltage) to avoid getting the same pseudo random sequence every time.
Don't forget what the H stands for.

Re: Request: Random Intervalometer
« Reply #7 on: 19 / August / 2010, 00:06:52 »
Thanks.  So basically I would use the random command with the interval time value?


*

Offline reyalp

  • ******
  • 13391
Re: Request: Random Intervalometer
« Reply #8 on: 19 / August / 2010, 00:31:47 »
Thanks.  So basically I would use the random command with the interval time value?
random produces a value in the range given (so my example would return a random value between 5 and 10 thousand.)

How you integrate that with your intervalometer depends on the rest of the code, but somewhere there should be a sleep() that makes the pause between exposures. Sleep takes a number in milliseconds.

If you have a particular intervalometer script you want to modify, someone might be able to give you the specific changes needed.
Don't forget what the H stands for.

Re: Request: Random Intervalometer
« Reply #9 on: 20 / August / 2010, 22:28:13 »
Thanks reyalp.  The Ultra Intervalometer would be perfect thanks to Keoeeit and Mika.

rem Author - Keoeeit
rem Upgraded by Mika Tanninen
rem Time accuracy and shutdown for a710is by Viktoras Stanaitis
rem h-accuracy for delay, j-accuracy for interval
h=-1
j=-1755
@title Ultra Intervalometer
@param a Delay 1st Shot (Mins)
@default a 0
@param b Delay 1st Shot (Secs)
@default b 0
@param c Number of Shots (0 inf)
@default c 0
@param d Interval (Minutes)
@default d 0
@param e Interval (Seconds)
@default e 10
@param f Interval (10th Seconds)
@default f 0
n=0
t=(d*600+e*10+f)*100+j
if c<1 then let c=0
if t<100 then let t=100
g=(a*60)+b+h
if g<=0 then goto "interval"
for m=1 to g
 print "Intvl Begins:", (g-m)/60; "min", (g-m)%60; "sec"
 sleep 930
 next m
:interval
  n=n+1
  if c=0 then print "Shot", n else print "Shot", n, "of", c
  shoot
  if n=c then shut_down
  sleep t
  goto "interval"

 

Related Topics