Wikia

CHDK Wiki

Changes: Fast Shooter Intervalometer

Edit

Back to page

m (fastshot.lua)
 
(2 intermediate revisions by one user not shown)
Line 8: Line 8:
 
--[[
 
--[[
 
@title Fast Shooter
 
@title Fast Shooter
  +
@chdk_version 1.3
 
@param n number of shots
 
@param n number of shots
 
@default n 5
 
@default n 5
 
@param d start delay seconds
 
@param d start delay seconds
@default d 1
+
@default d 1
 
--]]
 
--]]
   
Line 34: Line 35:
 
sleep(d)
 
sleep(d)
   
z = get_day_seconds()
+
start_tick = get_tick_count()
   
 
-- lock in the exposure and focus
 
-- lock in the exposure and focus
Line 40: Line 41:
 
repeat
 
repeat
 
sleep(50)
 
sleep(50)
until get_shooting() == true
+
until get_shooting() == true
 
set_aflock(1)
 
set_aflock(1)
   
Line 51: Line 52:
 
until(get_exp_count()~=ecnt)
 
until(get_exp_count()~=ecnt)
 
release("shoot_full_only")
 
release("shoot_full_only")
print("shot", i, "at". day_seconds-z, "seconds")
+
end_tick=get_tick_count()
  +
second = (end_tick - start_tick)/1000
  +
milliseconds = (end_tick - start_tick)%1000
  +
print("shot "..i.." at "..second.."."..milliseconds.." seconds")
 
end
 
end
   
Line 57: Line 58:
 
restore()
 
restore()
 
print("...done")
 
print("...done")
  +
   
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 01:31, June 20, 2015

This intervalometer will lock focus and exposure and take pictures as rapidly as possible. It should work on any CHDK equipped camera as it has nothing specific to any camera model. It also does not require the camera to be in continuous shooting mode.  Typical shooting speed is reported to be less that two seconds per shot.

Based on a code snippet provide by lapser in this post in the CHDK forum : Fast Shooter

fastshot.luaEdit

--[[
@title Fast Shooter
@chdk_version 1.3
@param n number of shots
@default n 5
@param d start delay seconds
@default d 1
--]]
 
-- restore
function restore()
    set_aflock(0)
end
 
set_console_layout(10, 0, 40, 14)
print("Fast Shooter Started...")
 
-- switch to shooting mode if necessary
if ( get_mode() == false ) then
  sleep(1000)
  set_record(1)
  while ( get_mode() == false) do
      sleep(100)
  end
end
 
-- programmable delay to let you get in the picture too
sleep(d)
 
start_tick = get_tick_count()
 
-- lock in the exposure and focus
press("shoot_half")
repeat
    sleep(50)
until get_shooting() == true
set_aflock(1)
 
-- fire away as fast as possible
for i=1, n, 1 do
   ecnt=get_exp_count()
   press("shoot_full_only")
   repeat
      sleep(20)
   until(get_exp_count()~=ecnt)
   release("shoot_full_only")
   end_tick=get_tick_count()
   second = (end_tick - start_tick)/1000
   milliseconds = (end_tick - start_tick)%1000
   print("shot "..i.." at "..second.."."..milliseconds.." seconds")
end
 
-- done
restore()
print("...done")

Around Wikia's network

Random Wiki