Jump to content

Recommended Posts

Thought I'd post this here for others. I modified this code to remove the trail feature and added what I like to call "Food Plot" mode. When switch is set to T it will power on, take a pic, power off and wait 30sec and do it all over again if there is activity. When switch is set to F it will do the same thing except pause for 60sec. You could use this with virtually any cam. Just change the shutter times.

 

'..:: Simple Sniper II code modified for Panasonic LS5 three wire hack by mattpatt ::.. 
'07/18/2012 - Removed trailcam mode and replaced with second feeder mode.
'		  Added warmup routine to test camera power up and shutter before going into Walktest

'Setting power switch to 'F' will allow for a 60 second delay between pics.
'Setting power switch to 'T' will allow for a 30 second delay between pics.


symbol ShutterPin=0
symbol CameraPowerPin=1
symbol TrailFeederSwitchPin=pin4
symbol MotionSensorInputPin=pin3
symbol LEDpin=2
'symbol PAXE=5
symbol ActivityMode=bit0 '0=off and 1 = on
symbol StartWithWalkTestONorOff=bit1
symbol CameraIsONorOFF=bit2 'keep track of camera being on or off for activity mode
symbol TimeToTurnCamOnToRefreshFlash=w3
symbol TmeWaitAfterCamOnToPresShuter=w4
symbol DelayBetweenPictures=w5
symbol TimeForWalkTestToEnd=w6 'delay for walktest
symbol DelayBetweenPictures2=13
symbol i=b1
disablebod
Low ShutterPin
Low CameraPowerPin
Low LEDpin
input 4
CameraIsONorOFF = 0
Pause 5000			
'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++    

TimeToTurnCamOnToRefreshFlash=25000	'25,000 = 1 hour, 50,000 = 2 hours with NAP3 (.144)
TmeWaitAfterCamOnToPresShuter=3500'"3.5 S"
StartWithWalkTestONorOff = 1  'on = 1 off = 0
DelayBetweenPictures=26 '26 = 60 seconds between pics in feeder mode switch set to 'F'    
TimeForWalkTestToEnd = 208 'Time for  walktest   0.144 secondss for nap3(208x0.144 = 30 seconds)

'++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++    

Wrmup:
High LEDpin						
Pause 1000							
High CameraPowerPin					'Turn Camera ON
Pause   500						
Low CameraPowerPin				
CameraIsONorOFF=1						
Pause   TmeWaitAfterCamOnToPresShuter
High ShutterPin					' Take a Picture
Pause 5000
Low ShutterPin
Pause 1000
High CameraPowerPin				' Turn Camera OFF
Pause   500
Low CameraPowerPin
CameraIsONorOFF=0
Low LEDpin
Walktst:
IF StartWithWalkTestONorOff = 1 Then
w1=w1+1 
NAP 3
IF MotionSensorInputPin = 1 Then
	High LEDpin
	Pause 1000
	Low LEDpin
	Pause 3000 'for sensor to settle
	w1=0
EndIF
IF w1 >=TimeForWalkTestToEnd Then
	StartWithWalkTestONorOff = 0
	For i = 1 to 10
		High LEDpin
		Pause 200
		Low LEDpin
		Pause 100
	next i
	Pause 1000
	GoTo lowpower
EndIF
EndIF
GoTo Walktst
lowpower:
IF MotionSensorInputPin=1 Then
IF CameraIsONorOFF=0 Then
	Pause 10
	IF TrailFeederSwitchPin = 1 Then
		ActivityMode=0
	Else
		ActivityMode=1
	EndIF
EndIF
IF ActivityMode = 0 Then
	If CameraIsONorOFF=0 Then
		Pause 10	
		High CameraPowerPin				' Turn Camera ON
		Pause   500
		Low CameraPowerPin
		CameraIsONorOFF=1
		Pause   TmeWaitAfterCamOnToPresShuter
	endif
	High ShutterPin			' Take a Picture
	Pause 5000
	Low ShutterPin
	Sleep 5
	High CameraPowerPin				' Turn Camera OFF
	Pause   500
	Low CameraPowerPin
	CameraIsONorOFF=0
	w1=0
	Sleep DelayBetweenPictures
EndIF
IF ActivityMode = 1 Then
	IF CameraIsONorOFF=0 Then
		Pause 10	
		High CameraPowerPin				' Turn Camera ON
		Pause   500
		Low CameraPowerPin
		CameraIsONorOFF=1
		Pause   TmeWaitAfterCamOnToPresShuter
	EndIF
	High ShutterPin			' Take a Picture
	Pause 5000
	Low ShutterPin
	Sleep 5
	High CameraPowerPin				' Turn Camera OFF
	Pause   500
	Low CameraPowerPin
	CameraIsONorOFF=0
	w1=0
	Sleep DelayBetweenPictures2
EndIF
w2=0
EndIF
w2=w2+1
IF w2 >= TimeToTurnCamOnToRefreshFlash Then
High CameraPowerPin				' Turn Camera ON
Sleep 1
Low CameraPowerPin
Sleep 5
High CameraPowerPin				' Turn Camera ON
Sleep 1
Low CameraPowerPin
w2=0
Pause 1000
EndIF
NAP 3	
GoTo lowpower				' Do it forever
End

Link to post
Share on other sites
 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing
     
     

    No registered users viewing this page.

     
  • Who's Online (See full list)
     
     

    There are no registered users currently online

     
  • Members
     
     

    No members to show

     
  • Member Statistics
     
     
    • Total Members
      6,959
    • Most Online
      866

    Newest Member
    davidflaming
    Joined
     
  • Forum Statistics
     
     
    • Total Topics
      54,920
    • Total Posts
      414,429
     
  • Recent Status Updates
     
     
     
  • Members
     
     

    No members to show

     
  • Member Statistics
     
     
    • Total Members
      6,959
    • Most Online
      866

    Newest Member
    davidflaming
    Joined
     
  • Recent Status Updates
     
     
     
×
×
  • Create New...