Trying to use intervalometer - General Discussion and Assistance - CHDK Forum supplierdeeply

Trying to use intervalometer

  • 9 Replies
  • 2297 Views
Trying to use intervalometer
« on: 30 / December / 2010, 16:43:59 »
Advertisements
Hi All,

I'm trying to use intervalometer script on my SD450 Digital Elph. I noticed that it's not listed as a tested camera on the script page so my problem simply might be that the camera is incapable of using the script.

The issue is that the script runs but I can only take pictures one at a time and have to push the "ALT" button after each image for the script to continue running, essentially it seems like the loop isn't working correctly.

Any ideas? Is it just the camera and I should stop wasting my time??

*

Offline fe50

  • ******
  • 3099
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Trying to use intervalometer
« Reply #1 on: 30 / December / 2010, 18:25:02 »
Hello & welcome, jmadero !

I'm trying to use intervalometer script on my SD450 Digital Elph. I noticed that it's not listed as a tested camera on the script page so my problem simply might be that the camera is incapable of using the script.
Some older IXUS series cameras are having problems with the shoot command, the IXUS 55 (SD450) is one of those cameras.

--> Use a script which use a shutter emulation (first do a half press, then a full press) instead...

You may also replace shoot to click "shoot_full" (for uBasic scripts) or click("shoot_full") (for Lua scripts) in your scripts.

Those scripts should work on all cameras:
* http://chdk.wikia.com/wiki/LUA#Minimalistic_Intervalometer
* http://chdk.wikia.com/wiki/LUA#yet_another_accurate_intervalometer
* http://chdk.wikia.com/wiki/User:Fe50#double_intervalometer


Re: Trying to use intervalometer
« Reply #2 on: 31 / December / 2010, 02:33:28 »
Thanks for that information. I tried using all three of those other scripts and all failed for one reason or another. Here is an example of one failing. Trying to use the first script and I get the following error:

uBASIC: 9 Parse err

For the second script it says "script started" or something like that but then it just freezes the camera.


Any ideas? Really hoping to get this ability functional as it's one of the easier techniques for a beginner to grasp....next comes the HDR :)

*

Offline zeno

  • *****
  • 885
Re: Trying to use intervalometer
« Reply #3 on: 31 / December / 2010, 03:52:48 »
Well, there's something wrong when you get a uBASIC error message trying to run a Lua script. Perhaps it's Lua that isn't working properly. Here's a minimal uBASIC intervalometer that should work. Try putting this in the scripts folder:
Code: [Select]
@title Simple Intervalometer
@param d Delay before start (Secs)
@default d 2
@param i Interval between photos (Secs)
@default i 5

sleep 1000*d
while 1
   shoot
   sleep i*1000
wend
end
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline whim

  • ******
  • 2013
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Trying to use intervalometer
« Reply #4 on: 31 / December / 2010, 05:12:13 »
Quote
Well, there's something wrong when you get a uBASIC error message trying to run a Lua script

Since this happened while trying to run the first script fe50 linked to,
it looks like @jmadero just gave the script the wrong extension:

introduction text to first linked script says:
Quote
This might serve well also as a script for you to read so that you can understand how scripting works. To use: create an empty text file called "mint.lua" in CHDK/SCRIPTS on the flash card. Paste the code below into the file. Start CHDK, press the shortcut key, press Set, select Load Script from File, find mint.lua, go wild.

HTH,

wim



Re: Trying to use intervalometer
« Reply #5 on: 04 / January / 2011, 23:31:32 »
Thanks for the hint whim, that fixed the errors but still no luck getting it to work. The first picture takes and the light blinks like it's going to take another one (similar to when I do the built-in timer function) but the next picture never takes.


Any other ideas??

Re: Trying to use intervalometer
« Reply #6 on: 14 / January / 2011, 09:09:04 »
>Thanks for the hint whim, that fixed the errors but still no luck getting it to work. The first picture takes >and the light blinks like it's going to take another one (similar to when I do the built-in timer function) >but the next picture never takes.

I get the same, on new IX1000 HS .first picture is shoot and light blink.

BUT!!!!!!

when i switch the key to leave alt mode(use the video Key), and switch it again to enter altmode, the script continue and shoot a picture.

now to get 3. picture i need press alt key again 2 times

on 5. picture then message come finish.

The question is wy alt key press help to continue the script ?
Maybe the Port miss a signal that image is store and it can continue ?

I use this script

rem Author - Keoeeit
rem Written for S-Series
rem Should be okay on others
rem Use Endless mode with caution
rem See documentation for important info
rem first version
@title Ultra Intervalometer
@param a Delay 1st Shot (Mins)
@default a 0
@param b Delay 1st Shot (Secs)
@default b 0
@param c Number of Shots
@default c 5
@param d Interval (Minutes)
@default d 0
@param e Interval (Seconds)
@default e 0
@param f Interval (10th Seconds)
@default f 5
@param g Endless? No=0 Yes=1
@default g 0
p=a*60000+b*1000
t=d*60000+e*1000+f*100
if c<1 then let c=5
if t<100 then let t=100
if g<0 then let g=0
if g>1 then let g=1
if p<0 then let p=0
z=t*c
y=p+z
print "1 Cycle Time:", y/60000; "min", y%60000/1000; "sec"
goto "interval"
:interval
  if p>0 then gosub "pause"
  print "Shot 1 of", c
  shoot      
  if c=1 then end
  for n=2 to c
  sleep t
  print "Shot", n, "of", c
  shoot
  next n
  if g=1 then goto "interval" else end
:pause
  n=(a*60)+b
  for m=1 to n
  q=n-m
  print "Intvl Begins:", q/60; "min", q%60; "sec"
  sleep 930
  next m
  return
« Last Edit: 14 / January / 2011, 09:32:17 by Bernd R »
Ixus 1000 HS

Re: Trying to use intervalometer
« Reply #7 on: 18 / January / 2011, 03:03:04 »
I find the problem, with that fix, also badbipixel.lua work and other Scripts that use shoot commands.read also below source

case AS_SHOOT:
        // Initiate a shoot. Remember that stack program flow is reversed!
        action_pop();


        action_push_delay(conf.script_shoot_delay*100);// XXX FIXME find out how to wait to jpeg save finished

        action_push(AS_WAIT_SAVE);
+        action_push_release(KEY_SHOOT_HALF);
        action_push_release(KEY_SHOOT_FULL);

        action_push_press(KEY_SHOOT_FULL);

        action_push(AS_WAIT_FLASH);
        action_push(AS_WAIT_EXPHIST);
        action_push(AS_PR_WAIT_EXPHIST);

        action_push_press(KEY_SHOOT_HALF);

        action_push(AS_PR_WAIT_SAVE);
    default:
        return 0;

The problem is, that there is no release of half_shoot send.

so its same as when press shoot full and then release the button only a little so that shoot_half is then the button state.

when do this by hand, it happen that after the change from shoot full to shoot half, chdk show no OSD values(even if histogram is always enable to show).canon firmware keep the focus box and when press shoot full later, it shoot a image with no Focus delay.

but with chdk when do a shoot, there need always after a shoot release the shoot button full and only then chdk OSD values come back.  
  
I get in mind maybe the propset4 value is wrong for PROPCASE_SHOOTING

when i watch the output of that value i can see that when press shoot half and hold, this change to 1.when press shoot full its too 1.

only when shoot button is full release, its 0.


what do cameras that work ok(for script shootcommand and badpixel.lua)  show for PROPCASE_SHOOTING in debug props ?
is it 1 when shoot half is press too ?


int shooting_in_progress()
{
    int t = 0;
    _GetPropertyCase(PROPCASE_SHOOTING, &t, sizeof(&t));
    return t != 0;
}
 


« Last Edit: 18 / January / 2011, 03:06:18 by Bernd R »
Ixus 1000 HS


*

Offline reyalp

  • ******
  • 11923
Re: Trying to use intervalometer
« Reply #8 on: 18 / January / 2011, 12:09:22 »
Good find Bernd R, added in changeset 1050
Don't forget what the H stands for.

Re: Trying to use intervalometer
« Reply #9 on: 23 / February / 2011, 10:30:39 »
A simular problem happen when the mint.lua script

when send  

release("shoot_full")   

then it hang always in that line.

  repeat sleep(50) until get_shooting() == false

Code: [Select]
--[[
@title Minimalistic Intervalometer
@param a Shooting interval, min
@default a 0
@param b ...sec
@default b 10
--]]
 
Interval = a*60000 + b*1000
 
function TakePicture()
press("shoot_half")
        repeat sleep(50) until get_shooting() == true
press("shoot_full")
release("shoot_full")
        repeat sleep(50) until get_shooting() == false
        release ("shoot_half")
      
      
end
 
repeat
StartTick = get_tick_count()
TakePicture()
sleep(Interval - (get_tick_count() - StartTick))
until false

modify the script

function TakePicture()
   press("shoot_half")
        repeat sleep(50) until get_shooting() == true
   press("shoot_full")
   release("shoot_full")   
        release ("shoot_half")
        repeat sleep(50) until get_shooting() == false

......

only work.
the problem is that propcase_shooting is only set to 0 when shoot button is full release.
but as i understand from the lua script, shooting should only set when shoot full is press.
« Last Edit: 23 / February / 2011, 10:33:11 by Bernd R »
Ixus 1000 HS

 

Related Topics