Looking for help on a script for a cool project! - Script Writing - CHDK Forum supplierdeeply

Looking for help on a script for a cool project!

  • 6 Replies
  • 2401 Views
Looking for help on a script for a cool project!
« on: 20 / February / 2011, 19:36:44 »
Advertisements
Hi there,

I have a Canon Powershot sx100 IS that I am going to attach to a weather balloon and send way up in the sky to near space. I'm pretty new to CHDK (and Canon in general, I'm a Nikon guy) but I purchased this camera just for this purpose.

I'd like to have the script do the following:

-adjust exposure
-auto-focus - I'm going to assume that infinity would be the correct setting for this project
-take a picture every 40 seconds
-disable screen for maximum battery life

I've already created a custom power supply that will give me 8aa batteries for power, I will test to see how long this will last.

If anyone can help that would be great!

Thanks!

*

Offline reyalp

  • ******
  • 12725
Re: Looking for help on a script for a cool project!
« Reply #1 on: 20 / February / 2011, 19:41:05 »
Welcome

If you search the forum (things like balloon, near space, stratosphere etc.) you should find links to some previous projects like this with some scripts you can re-use, as other useful information.
Don't forget what the H stands for.

Re: Looking for help on a script for a cool project!
« Reply #2 on: 21 / February / 2011, 01:00:15 »
Welcome

If you search the forum (things like balloon, near space, stratosphere etc.) you should find links to some previous projects like this with some scripts you can re-use, as other useful information.
Thanks, I did find some useful information, such as this:
http://chdk.wikia.com/wiki/LUA#Minimalistic_Intervalometer

Also a simple way to disable the screen is to plug in something to the A/V port.

After reviewing some threads/similar projects I'd like to have the following:
-iso at 80
-have the camera set to TV
-auto aperture adjust
-have the focus stay constant at infinity.

Can anyone help with this? I'm horrendous at scripting/programming. I'm not going to lie.

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Looking for help on a script for a cool project!
« Reply #3 on: 21 / February / 2011, 15:58:30 »
...After reviewing some threads/similar projects I'd like to have the following:
-iso at 80
-have the camera set to TV
-auto aperture adjust
-have the focus stay constant at infinity.

Can anyone help with this? I'm horrendous at scripting/programming. I'm not going to lie.
I'm not aware of a way to have a script set/control the first two items in your list, but those you can set on the camera manually (their status can be read, but many of the newer cameras cannot be set via script). The third item on your list is a normal function when using Tv and AE, so that shouldn't be a problem. The fourth item can usually be controlled manually using MF and AF lock if they are available on your camera. It appears about the only thing left you will need is an intervalometer script. A good source for working intervalometer scripts is the "Completed and Working Scripts" forum: http://chdk.setepontos.com/index.php?board=12.0

Good luck on your project!
« Last Edit: 21 / February / 2011, 18:02:07 by SkyWalker9 »


*

Offline reyalp

  • ******
  • 12725
Re: Looking for help on a script for a cool project!
« Reply #4 on: 21 / February / 2011, 23:40:19 »
I'm not aware of a way to have a script set/control the first two items in your list, but those you can set on the camera manually (their status can be read, but many of the newer cameras cannot be set via script).
FWIW, both ISO and shooting mode can be set from script:
ISO: set_iso, set_sv96 (see http://chdk.wikia.com/wiki/UBASIC/TutorialScratchpad#The_set_iso_and_get_iso_commands and http://chdk.wikia.com/wiki/CHDK_firmware_usage/AllBest#Current_List_of_uBASIC_Operations_and_Commands: )

shooting mode: set_capture_mode, set_capture_mode_canon (see http://chdk.wikia.com/wiki/Script_commands#get_capture_mode)

Modern powershots (digic 4, digic 3 ?)  have a 'focus at infinity' setting, which can be set using propcases. This is the simplest/most reliable way to focus at infinity on the cameras that support it. See http://chdk.wikia.com/wiki/PropertyCase
Don't forget what the H stands for.

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Looking for help on a script for a cool project!
« Reply #5 on: 22 / February / 2011, 20:03:35 »
...Also a simple way to disable the screen is to plug in something to the A/V port.

After reviewing some threads/similar projects I'd like to have the following:
-iso at 80.
Thanks to @reyalp, I now know how to set the ISO via script -  many thanks to @reyalp!

You could manually set the ISO to 80 on your camera while in Tv mode using the ISO button (page 110 of your Users Manual) or use a "set_iso" statement in your script. The script statement uses indexing as follows: 0=AutoISO, 1=50(80), 2=100, 3=200, 4=400,  5=800, 6=1600). Insert the following statement near the beginning of an interlometer script, just after the parameter declarations: set_iso 1
For example, using my "Selective Intervalometer" script at http://chdk.setepontos.com/index.php?topic=6105.0
Code: [Select]
rem Author SkyWalker9
@title Selective Intervalometer
@param a Number of Shots
@default a 10
@param e Interval (mins)
@default e 5
@param f Interval (secs)
@default f 0
@param p Starting Hour (24 Hr)
@default p 7
@param q Starting Minute
@default q 0
@param r Ending Hour (24 Hr)
@default r 18
@param s Ending Minute
@default s 0

  set_iso 1

rem Check input variables for proper values
  if a<0 then a=2
  if e<0 then e=0
  if f<0 then f=0
  if p<0 then p=0

Quote
-have the camera set to TV
-auto aperture adjust
I didn't know from your comment if you wanted to do this via script or your were just describing something you were going to do with the camera. As you may already know, you can set the "Mode" dial on your camera to Tv

Quote
-have the focus stay constant at infinity.

Can anyone help with this? I'm horrendous at scripting/programming. I'm not going to lie.
Use the AF Lock on your camera (page 104 of your Users Guide). Focus camera on distant object/scene and then set AF Lock before sending aloft. The focus will remained locked at infinity for all shots

Other things to consider with your camera to save on battery load:
- Set your "Review" to off (camera Menu item)
- Set your "Display Off" to 10 sec (camera Menu item); the plug in the A/V port will avoid the LCD from displaying but there is other background processing the camera is still doing during the time the LCD would normally be on, so keeping the LCD display processing times short will lengthen battery life. ref: http://chdk.setepontos.com/index.php?topic=2622.msg24354#msg24354
- Set your "Auto Power Down" to "OFF" (camera Menu item)
- Set your "Shooting mode" to "Standard, no information" using your camera's DISP button

Good luck on your project and let us know how it comes out!
« Last Edit: 22 / February / 2011, 21:06:19 by SkyWalker9 »

Re: Looking for help on a script for a cool project!
« Reply #6 on: 02 / March / 2011, 05:29:20 »
Never mind- have started a new thread..
« Last Edit: 02 / March / 2011, 08:35:44 by mrkrinkle »

 

Related Topics