Glad the project is going well. Maybe you can post a picture of a badger soon
Things here went better than expected, now I am back in the shop trying to get caught up on other things... it never ends![]()
Glad the project is going well. Maybe you can post a picture of a badger soon
Things here went better than expected, now I am back in the shop trying to get caught up on other things... it never ends![]()
Dave
Always wear safety glasses while programming.
I should have it rigged to go for the weekend so fingers X'd.Glad the project is going well. Maybe you can post a picture of a badger soon
I'm still amazed at the versatility of these PIC's though, is there anything they can't do circuit wise?
Pleased it went well, like you say though....it never does endThings here went better than expected, now I am back in the shop trying to get caught up on other things... it never ends
Take it easy.
Dave
Well I spent hours writing a program to operate a video camera to film the 'Badger' only to find out that the video camera after five minutes powers down and a switch has to be pushed up to re-activate into record mode and then the record button pressed. So a non starter after all that.
I then hooked out my old but simple digital stills camera and re-wrote the program to activate that.The camera stays 'on' when powered up using the mains adaptorso no power down problem and I've turned the LCD display off.
All I need to do now is make a simple board up for the PIC (It's on breadboard at the moment) and I should be in business tomorrow night.
Probably not the most accurate program ever written, then again I couldn't turn an LED on this Februaryanyway here's the code:
What do you think?Code:ANSEL = %00000000 'Disable analog select so ports work as digital i/o. CMCON0 = %00000111 'Disable analog comparators. TRISA = %00000000 'Set PORTA as OUTPUT. PORTA = %00000000 'Set PORTA pins all low. TRISC = %00001000 'Set PORTC.0 as INPUT. PORTC = %00000000 'Set PORTC pins all low. x var byte 'Loop counter Variable Servo var PORTC.1 'Servo control output_pin PORTC = 0 'Setup for high_pulsout MAIN: PAUSE 50 FOR X = 1 TO 20 PULSOUT Servo,180 'Set the Servo_Arm_Pos (Ready to take a picture) PAUSE 20 NEXT X LOOP1: PAUSE 50 IF PORTC.3 = 0 THEN FIRE: 'PIR Activated (Badger present?)(N/C Contacts opened). IF PORTC.3 = 1 THEN LOOP1:'PIR Not activated loop until it is. FIRE: 'Take a picture routine PAUSE 50 FOR X = 1 TO 20 pulsout servo,130 'Servo_arm moves cable release to take picture PAUSE 50 NEXT X pause 1000 'Time for shutter to fire FOR X = 1 TO 20 'Cable release for camera released / picture taken PULSOUT Servo,180 'Servo_arm moves back releases cable release PAUSE 50 NEXT X PAUSE 10000 'Wait 10 sec's for Camera flash to recycle / recharge goto LOOP1:
Dave
Looks like you are coming right along!
But I am curious about one thing...
What do you plan to do when you find out it is a badger?
Dave
Always wear safety glasses while programming.
Well just enjoy it and try and take a photo record of it's visits (as long as he / she / they don't start digging the garden up they're more than welcome). We had three Deer that 'visited' a whileWhat do you plan to do when you find out it is a badger?
back, all was well until they got hungry one night and ate all my wife's shrubs!!! So there are risks attached to 'nature watching'.
Dave
Breaking news. Operation 'Badger' has just gone live......
I've had a few teething problems though, the main one being that although the PIR is out in the garden the camera itself is photographing through a double glassed unit and the flash swamps the picture, it looks like snow. The best I could do tonight was move the camera back into the room and alter the camera angle on the trpod to about 45 degrees.If I get a picture I'll zoom in and edit it.
If I get any pictures I'll post them up.
Probably a very good, not to mention safe way of getting cub footage. I've heard Bears are very protective of their young. A badgers claws are big enough for meSeen a couple bear cams and they were really interesting. Even had cubs in it!
I might have trouble sleeping tonight, all rather exciting this
Dave
Bookmarks