:test if t>0 then print "Detected cells: ",t else print "No detection in 10 min!" shoot t=0 endifgoto "repete"
Ah, that nesting wasn't obvious to me in the original script. Thanks for breaking that down. Now I see where I should have put it. I sure appreciate the help! I'll give this a shot (or two, or a hundred)
@title Motion Detectionrem Original author: MLuna - based om MX3 sample scriptrem Shot without auto-focus/with auto-focus/continuously (need to put in continuous mode manually)@param a Shot (0=nf/1=f/2=c)@default a 1rem How long the shutter button will be pressed in continuous mode@param b Continuos shoot (secs)@default b 10rem This value determines how much change in picture brighness will trigger a shotrem Experiment with this value to find one fitted to your needs@param c Threshold (0-255)@default c 5@param d Compare Interval (msecs)@default d 20@param e Compare Interval (secs)@default e 0rem If this value is too small, the camera goes continuously shooting after the 1st shot.rem Experiment with this value to find one fitted to your needs@param f Begin Delay (secs)@default f 5@param g Pix step(speed/accuracy adj)@default g 5@param h Columns @default h 6@param i Rows @default i 6rem Frame width in which no MD is performed (in cell units)@param j Dead frame @default j 0if a<0 then let a=0if a>2 then let a=2if c<0 then let c=0if d<0 then let d=0if e<0 then let e=0if g<1 then let g=1if h<1 then let h=1if i<1 then let i=1if j<0 then let j=0rem Conversions secs to msecslet b=b*1000let e=e*1000let f=f*1000let d=d+erem This is the timeout in msecs. After this period, the motion trap is rearmed.let T=600000rem Parameters for the Dead Framelet J=j+1let H=h-jlet I=i-jprint "press Shutter Button to Stop":repete t=0 md_detect_motion h, i, 1, T, d, c, 1, t, 1, J, J, H, I, 0, g, f if t>0 then print "Detected cells: ",t if a=0 then click "shoot_full" if a=1 then shoot if a=2 then goto "continuos" else print "No detection in 10 min!" shoot endifgoto "repete":continuos let X=get_tick_count press "shoot_full" :contloop let U=get_tick_count let V=(U-X) if V<b then goto "contloop" release "shoot_full" let t=0goto "repete"end
Quote from: geocrasher on 28 / December / 2012, 11:26:57Ah, that nesting wasn't obvious to me in the original script. Thanks for breaking that down. Now I see where I should have put it. I sure appreciate the help! I'll give this a shot (or two, or a hundred)I couldn't figure it out last night either. Waterwingz is a great resource on this board. I really appreciate all the help he's given me. He's been a real "shot" in the arm when I don't understand something.http://idioms.thefreedictionary.com/shot+in+the+arm (for the Deutschlanders)
So, I modified the script, but all it does is flash the green grid on the screen over and over. This was the same problem that I had when I tried to modify it myself last night. It works fine before modification. Ideas?WAIT- just saw your modified script- trying that now... Modified script appears to be working- Thank you! I am testing it now and will post with any questions I have.
My next step is to buy a camera that can handle FAT32 so I can do 8 and 16GB cards for the really long term stuff, but I should be able to use the 2GB card I have quite effectively for now.
Started by gjhai1 Creative Uses of CHDK
Started by opsnake General Help and Assistance on using CHDK stable releases
Started by andrewhazelden « 1 2 3 4 » Script Writing
Started by Salvatore Chiarelli General Discussion and Assistance
Started by Duke2k General Help and Assistance on using CHDK stable releases