Script to 'co-operate' with external controller - page 2 - Script Writing - CHDK Forum supplierdeeply

Script to 'co-operate' with external controller

  • 37 Replies
  • 11818 Views
*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #10 on: 21 / September / 2016, 18:16:08 »
Advertisements
I need photos at 5 minute intervals for this project. Need to measure script run-duration when it's working right. Aiming to have external controller turn power on, leave it on for 10sec plus script run-duration. Leave it off for (5 min minus (10s+run dur)).  Repeat. Does that sound reasonable?
« Last Edit: 21 / September / 2016, 18:18:35 by jules »

Re: Script to 'co-operate' with external controller
« Reply #11 on: 21 / September / 2016, 18:36:18 »
Stumbling along a rocky path...  first an error message about variables - maybe they have to be done differently for v 1.3 ? I set fixed values instead.
I corrected this and attached a new script (below).  The problem was a 1.3 vs 1.4 issue as expected.

Quote
Then other issues that I could not identify properly. Possibly something went wrong with testing card space? Possibly lcd disable/enable behaves differently on D10?
Another 1.3 vs 1.4 issue. While 1.3 scripts will run on 1.4, the converse is not necessarily true.  In this case,  I believe the issue was passing "true" rather than "1" to the set_lcd_display() function.  I reverted to 1.3 conventions in the attached script.

Quote
Also wondering whether there's any way to have a button-press to turn off autostart while the script is running?  Might need this in order to get view screen to stay on long enough for another check. I will be unable to delete the config file after the camera is in position in its mounting box.  Perhaps something like 'menu' press that will safely stop Ultimate Intervalometer - I'm thinking maybe it could disable autostart before safely stopping - could that be feasible?
Done. 

Note that you could have just pressed the camera's shutter button right after the script autostarts to abort instantly.  But now you have the option of pressing the MENU button after the shot as well.

I need photos at 5 minute intervals for this project. Need to measure script run-duration when it's working right. Aiming to have external controller turn power on, leave it on for 10sec plus script run-duration. Leave it off for (5 min minus (10s+run dur)).  Repeat. Does that sound reasonable?
Well,  the script turn the camera off on its own. So you can let your external controller leave the power on for four minutes if you like - no precision measurements needed.

Try the new script?  If it acts up, please post the log file that was created (by default now).
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #12 on: 21 / September / 2016, 21:04:47 »
Many thanks for the new script. Will report after testing but that has to wait until late tonight (UTC+10).
 

Re: Script to 'co-operate' with external controller
« Reply #13 on: 21 / September / 2016, 21:06:12 »
Hotel California?
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #14 on: 21 / September / 2016, 21:18:58 »
Uh oh... not really  ;)

*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #15 on: 21 / September / 2016, 21:22:18 »
Also thanks for suggestion about leaving power on 4 minutes... maybe I need to rethink my rationale with the controller. I am way out of my depth with this - I guess it's obvious.

Reducing power use to absolute minimum is the objective. Atmega chip has to go into low power sleep between photos and I had assumed it's also worth turning off the external power source to camera when not needed. E.g. in case voltage adaptor and/or something else might cause small power drain while the camera is off?

Re: Script to 'co-operate' with external controller
« Reply #16 on: 21 / September / 2016, 23:16:01 »
Reducing power use to absolute minimum is the objective. Atmega chip has to go into low power sleep between photos and I had assumed it's also worth turning off the external power source to camera when not needed. E.g. in case voltage adaptor and/or something else might cause small power drain while the camera is off?
I think you are correct here.  If you can really shutdown the power to the camera at the source, that will be better than just turning off the camera.  Maybe not a lot better .. but still better.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #17 on: 22 / September / 2016, 07:28:50 »
[...]  If you can really shutdown the power to the camera at the source, that will be better than just turning off the camera.  Maybe not a lot better .. but still better.

Thinking about this some more, shutting off power is probably *essential* even if I didn't care about small difference in power saving.... otherwise I think [lightning bolt] I could not get 5 minute intervals between images.

In proposed scenario with camera having the power button held down continuously, if I were to leave power supply on, I guess the camera will autostart pretty soon after the script shuts down each time. Then the script will take another photo, again set 'autostart once'.... 

Seems I would end up with many images separated only by the duration of running the script?


*

Offline jules

  • **
  • 73
Re: Script to 'co-operate' with external controller
« Reply #18 on: 22 / September / 2016, 17:07:04 »
Big thankyou waterwingz, your new script runs well. You knew that of course!

At this point my button-down testing is inconclusive because hold-down is unreliable.

D10 power button is particularly challenging for this  unfortunately. Has a very smooth curved surface and very short vertical movement between on and off. For manual use I easily got used to it, but mechanical hold-down needs a serious re-think [big sigh].

Re: Script to 'co-operate' with external controller
« Reply #19 on: 22 / September / 2016, 17:11:43 »
If you figure out how to get it apart, then adding jumps wires the the power switch odd probably the way too go.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics