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

Share this post


Link to post
Share on other sites
 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×