--[[ @title TIK TDCI test @chdk_version 1.5 @param d TimeOut (Seconds) @default d 10 @param e Loop Delay (mSec) @default e 1 @param f Threshold @default f 0 @param o Target Frame Time (mSec) @default o 0 ]] -- This code shoots a still image, -- then captures a TIK TDCI file using the motion_detect interface, -- the shoots another still press("shoot_half") repeat sleep(50) until get_shooting() == true press("shoot_full") sleep(500) release("shoot_full") repeat sleep(50) until get_shooting() == false release("shoot_half") sleep(500) a=6 -- columns to split picture into b=6 -- rows to split picture into c=8 -- measure mode (Y,U,V R,G,B), U=0, Y=1, V=2, R=3, G=4, B=5, TIK TDCI=8 dt=d*1000 g=0 -- draw grid (0=no, 1=grid, 2=sensitivity readout, 3=sensitivity readout & grid) h=0 -- not used in LUA, but still needs to be there i=0 -- region masking mode: 0=no regions, 1=include, 2=exclude j=0 -- first column k=0 -- first row l=0 -- last column m=0 -- last row n=0 -- optional parameters (1=shoot immediate) p=100 -- trigger delay in mSec zones = md_detect_motion( a, b, c, dt, e, f, g, h, i, j, k, l, m, n, o, p) print("Captured " .. zones .. " frames") press("shoot_half") repeat sleep(50) until get_shooting() == true press("shoot_full") sleep(500) release("shoot_full") repeat sleep(50) until get_shooting() == false release("shoot_half")