is it possible to set a timer for MD script to start? - General Help and Assistance on using CHDK stable releases - CHDK Forum

is it possible to set a timer for MD script to start?

  • 7 Replies
  • 5481 Views
is it possible to set a timer for MD script to start?
« on: 14 / October / 2009, 06:07:38 »
Advertisements

i think this is possible with with the intervalometer maybe, but i can't figure out how to do it for Motion Detect.

Basically i want to set it up before i go to work, and have it start at about lunchtime - so delay it be 4 hours or so.

possible?

Re: is it possible to set a timer for MD script to start?
« Reply #1 on: 14 / October / 2009, 13:33:17 »
Basically i want to set it up before i go to work, and have it start at about lunchtime

Checkout the SDM command 'sleep_until' and the example given here.

Should work OK, let us know.

Replace your DISKBOOT.BIN with version from http://stereo.jpn.org/eng/sdm/index.htm
Add 'sync_off' as the first uBasic command of your script.

Re: is it possible to set a timer for MD script to start?
« Reply #2 on: 14 / October / 2009, 21:34:02 »

hmmmm.....  that may be beyond my technical capabilities but i'll give it a crack - thanks heaps (:

*

Offline reyalp

  • ******
  • 14125
Re: is it possible to set a timer for MD script to start?
« Reply #3 on: 15 / October / 2009, 03:00:03 »
You can use the sleep command in CHDK ubasic or lua to make the script wait the specified number of milliseconds.
Don't forget what the H stands for.

Re: is it possible to set a timer for MD script to start?
« Reply #4 on: 15 / October / 2009, 08:37:18 »

hmmmm.....  that may be beyond my technical capabilities but i'll give it a crack - thanks heaps (:

There is nothing technical required.
Replace your DISKBOOT.BIN.

To the top of your script add :-

sync_off
sleep_until  12,0
(and then your motion-detection script)

If it does not work post your full changed script here.
In above example, camera sleeps until 12:00 local time

Re: is it possible to set a timer for MD script to start?
« Reply #5 on: 15 / October / 2009, 23:49:13 »

so if i understand correctly, i basically write a new script for each time i want to delay it, and the script will use the clock in my camera to time it by?

could you please tell me what the diskboot.bin does, and why i am replacing it? will this change anything else by replacing this?

cheers.

*

Offline reyalp

  • ******
  • 14125
Re: is it possible to set a timer for MD script to start?
« Reply #6 on: 16 / October / 2009, 00:09:49 »

so if i understand correctly, i basically write a new script for each time i want to delay it, and the script will use the clock in my camera to time it by?
You could make it a script parameter that you set in the menu. In fact, you should be able to find examples of scripts that do this.
Quote
could you please tell me what the diskboot.bin does, and why i am replacing it? will this change anything else by replacing this?
He is telling you to use SDM (a fork of the CHDK project that he maintains) instead of CHDK, and yes, you will lose every CHDK feature that isn't in SDM, and gain every SDM feature that isn't in CHDK, and no, there's no comprehensive list that I know of.

Don't forget what the H stands for.

Re: is it possible to set a timer for MD script to start?
« Reply #7 on: 16 / October / 2009, 04:57:14 »

 i basically write a new script for each time i want to delay it

If you look at the link I gave you, the hours and minutes are two script parameters 'a' and 'b'.
You can change them at any time to set required starting time.


Quote
the script will use the clock in my camera to time it by?

Yes.

Quote
could you please tell me what the diskboot.bin does, and why i am replacing it?

The basic CHDK does not support many uBasic commands.

If you temporarily rename DISKBOOT.BIN to DISKBOOT.BIN1 (or anything you like) you can quickly re-enable the basic CHDK by changing the name back to DISKBOOT.BIN.

It takes just a few seconds.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal