help with a570 , time lapse, take picture every hour - Script Writing - CHDK Forum  

help with a570 , time lapse, take picture every hour

  • 5 Replies
  • 6401 Views
help with a570 , time lapse, take picture every hour
« on: 12 / June / 2012, 21:39:56 »
Advertisements
First, I love this program!  Thank you to all who helped make it available for two of my older Canons.

I am wanting to take a picture every hour or so.  I started to use the built in script that is in seconds.  I quickly found it taking a long time to get to 3600+ seconds.

What is the best way for me to set it up so I can set it for seconds, minutes, or hours if desired. 

Thank you. 

Re: help with a570 , time lapse, take picture every hour
« Reply #1 on: 12 / June / 2012, 21:49:14 »
Welcome to CHDK.

The built in script was written to be as short and concise as possible to make it easy to read and understand.  A great user interface was not part of the requirements.

Having said that,  I'll share a "secret" CHDK power user trick.   When you get to the part where you are using the up and down keys to change the number of seconds,  take a look in the upper right hand corner of the menu.  You should see a +1 symbol.   Use the cameras zoom lever / button at that point and watch the symbol change.  Then use the up and down keys and see that the values now change much faster.   Its basically a range changer - lets you adjust the value in the script parameter menu much faster (works in all other CHDK menu entry fields too).

Otherwise,  you could edit the script - one small change to one line would give you minutes as you require.

Code: [Select]
@title Intervalometer
@param a = interval (min)
@default a 15

do
    s = get_tick_count
        shoot
    sleep a*60000 - (get_tick_count - s)
until ( 0 )


Or search the wiki for "Intervalometer" .  No shortage of more sophisticated scripts there.



« Last Edit: 12 / June / 2012, 21:53:05 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: help with a570 , time lapse, take picture every hour
« Reply #2 on: 12 / June / 2012, 22:24:46 »
Thank you for the quick reply.  I now have my a570 set up to take a picture every 4 hours of a plant I have flowering over the next month.

I thought I could hit DISP key to turn off the lcd screen, then print/hot key/ quick key to activate CHDK and click the shoot key.  It did not work so now the lcd screen is constantly on.  I need to search the wiki for how to run time lapse without lcd on. 

Re: help with a570 , time lapse, take picture every hour
« Reply #3 on: 12 / June / 2012, 23:03:21 »
It did not work so now the lcd screen is constantly on.  I need to search the wiki for how to run time lapse without lcd on. 
The LCD screen backlight actually does not consume that much power although everyone thinks it does.  Even with it off,  your batteries will not last for weeks - maybe a few days.   Lots of posts on the forum about battery backup options.

Meanwhile,  here's the same script with a command to turn off the LCD backlight :

Code: [Select]
@title Intervalometer
@param a = interval (min)
@default a 15

do
    s = get_tick_count
        shoot
        sleep(2000)
        set_backlight 0
    sleep a*60000 - (get_tick_count - s)
until ( 0 )


Apparently if you plug in an external video cable you actually disable the backlight and display electronics, saving even more power.

« Last Edit: 12 / June / 2012, 23:06:04 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline reyalp

  • ******
  • 14080
Re: help with a570 , time lapse, take picture every hour
« Reply #4 on: 13 / June / 2012, 01:25:29 »
I thought I could hit DISP key to turn off the lcd screen, then print/hot key/ quick key to activate CHDK and click the shoot key.
What happened when you tried to do this ? It should on a camera like a570 that has an optical viewfinder. Works on my a540, which is pretty similar.

You can also modify the script so it sends a "display" keypress after starting, something like this (before the main do loop):
Code: (lua) [Select]
props=require('propcase')
while get_prop(props.DISPLAY_MODE) ~= 2 do
 click('display')
 sleep(100)
end

Apparently if you plug in an external video cable you actually disable the backlight and display electronics, saving even more power.
AFAIK this does not save much power. Running the sensor and "video card" on the camera appears to be more expensive than the LCD. When available, the Canon display off mode is the best bet.

FWIW, on cameras like this, you don't need the actual video cable, there is a physical switch in the plug, so a non-conductive item like a toothpick will do just fine.
Don't forget what the H stands for.

Re: help with a570 , time lapse, take picture every hour
« Reply #5 on: 13 / June / 2012, 18:22:36 »
Thanks for all the quick helpful replies.  I only wanted the LCD off because its facing my projector screen so if I were to watch a movie over the next month it would be a nuisance.  I guess I could have just put a duct tape flap on it, hehe.  Double sided of course so no sticky issues.

It is plugged into an AC adapter so I don't have to worry about batteries.  Although it is nice to know the most efficient way for future uses.

I opted for the toothpick method for now since I know nothing about writing scripts.  Something I should dive into as I know I could use them to my advantage.  I bet I could write something to only take photos during daylight hours.  Right now its just every 13000 seconds so wasting some pics at night.  Figure I need at least one good shot per day so I will have a few to choose from.   

Again thanks to everyone who made this possible.  Instead of purchasing a new camera that has time lapse options and then an AC adapter I am now able to use two free Canons I had.  "goes and looks for a paypal donate section".

 

Related Topics