Script writing assistance for intervalometer with shut off - page 2 - Script Writing - CHDK Forum supplierdeeply

Script writing assistance for intervalometer with shut off

  • 56 Replies
  • 15739 Views
Re: Script writing assistance for intervalometer with shut off
« Reply #10 on: 23 / July / 2011, 07:25:05 »
Advertisements
SDM had not been ported to the A490 so I have done that now.

If it boots we can continue, if not I will wait until a tester is available.

Just rename your existing DISKBOOT.BIN and replace with this :-

http://www.zshare.net/download/92911226ccd42d44/

The script has certain advantages over anything you are likely to write in the time available.
Hopefully, I will be able to explain later.


Re: Script writing assistance for intervalometer with shut off
« Reply #11 on: 25 / July / 2011, 10:56:43 »
Ok, that worked. The inbuilt script says "Hello !" :)

Re: Script writing assistance for intervalometer with shut off
« Reply #12 on: 25 / July / 2011, 13:43:16 »
Good, at least it boots.

I will post further information in a new post shortly .. I am feeling hungry  :)

Re: Script writing assistance for intervalometer with shut off
« Reply #13 on: 25 / July / 2011, 16:35:36 »
Copy the attached script to your Scripts folder, boot camera and load script.
It is speeded-up by a factor of 5x compared to the real mission.

Position the camera so that the lens is blocked from the light.
In the real mission this is when the camera is in the payload and a lenscap or similar is fitted.
Start the script.

The screen will blank and you will hear a beep every ten seconds to assure you the script is running.
After three minutes, it will start to check for lens cap removal and an led will be lit.

At any time after that, point the camera at brighter light.
The autofocus led will flash for five seconds to indication mission start and the setting of the mission elapsed-time clock to 00:00:00.

A 60 second lift-off movie will be taken followed by 5 minutes of fast shots every 30 seconds.
The desired shutter speed is 1/2000 sec at a maximum ISO of 160.
The ISO will be adjusted to suit or if 1/2000 cannot be achieved, the ISO will be set to 160 and the appropriate shutter speed used.

A 36 second higher altitude movie is recorded followed by a further 6 minutes of fast shots.

Next, 100 brightness readings are taken and sorted in ascending order.
The 50% to 80% brightest are then averaged and based on that brightness value exposure is calculated.
Calculated exposure is used for the rest of the ascent.
The idea of this method is to avoid incorrect exposures caused by the camera seeing large areas of black space or occasional direct views of the sun.

When you run the script, try covering the lens for the first fifty exposures, pointing at bright light for next twenty and at normal exposure for remaining thirty.

Five minutes of fast shots using computed exposure followed by 36 second high altitude movie.

(Descent phase is now assumed, no way of detecting this in mission I am helping with).

Four minutes of fast shots every three seconds using an exposure recalculated every twenty shots.

24 second movie.

Seven minutes of fast shots every three seconds using an exposure recalculated every twenty shots.

At this point, the movie and fast shots are continually repeated until mission ends, card full or battery exhausted.

In this version, rem goto "loop" disables the looping.

All of this is based on original work by member Francesco Bonomi who I have been unable to contact recently.

In folder CHDK you wil find LOG.txt that documents the mission and exposure for each image.



« Last Edit: 25 / July / 2011, 16:37:54 by Microfunguy »


Re: Script writing assistance for intervalometer with shut off
« Reply #14 on: 26 / July / 2011, 02:07:10 »
The camera crashed during the lens cap subroutine. I removed that part of the script and it appeared to run but it only recorded pictures, not video. :/

Re: Script writing assistance for intervalometer with shut off
« Reply #15 on: 26 / July / 2011, 06:05:19 »
No problem.

I remembered WHILE I was asleep that I had not implemented it yet on the A490.
There are two ways of doing this, let us try the method I know works with the A480 :-

http://www.zshare.net/download/929981952ae269ea/

Run this script :-

@title Movie
sleep_for_seconds 2
shoot_movie_for 10
sleep_for_seconds 2
end


Does that record a movie clip ?


Re: Script writing assistance for intervalometer with shut off
« Reply #16 on: 26 / July / 2011, 12:38:26 »
Yes that worked. :) I then tried running the balloon script but it still crashes during the lens cap thing. I tried taking it out but it doesn't work properly (it records movie though).

Re: Script writing assistance for intervalometer with shut off
« Reply #17 on: 26 / July / 2011, 12:43:10 »
Good.

We may as well try to sort-out the lens cap problem.

Please describe exactly how far it gets.

I have added logging of real date and time.

Do you have two cameras ?

If so, for the log files I have a way of differentiating between them.

The Las Vegas flight is scheduled for Thursday.

I am in UK.


David


Re: Script writing assistance for intervalometer with shut off
« Reply #18 on: 26 / July / 2011, 13:00:39 »
Make a copy of the script and name it test.bas.

In :phaseA delete everything between beep 10 and beep_off and replace with 'sleep_for_minutes 1'.

Does that crash ?

Re: Script writing assistance for intervalometer with shut off
« Reply #19 on: 26 / July / 2011, 13:17:13 »
After I run the script with the lens covered, the camera says "script started pauses until lens cap removed" and the backlight turns off. I then uncovered the lens ten seconds later (I changed the sleep_for_minutes in line 86 to sleep_for_seconds) but nothing happened because the camera was off. I think it might have a problem with the cover_lens command.

 

Related Topics