Hi all,
I posted a week or two back about a DIY camera trap I am building.
http://forum.arduino.cc/index.php?topic=165646.0
The unit has two PIR sensors mounted at the front of the enclosure and an LDR sensor all connected to Arduino UNO board and a Sony Handycam DCR-35SR camera. The LANC controlle coder uses a REC command to start and the same command to stop recording.
The aim of the unit is to check the PIR sensors (2 off) and when either is activated, record for a period of time until the sensors are no longer active. The camera has a nightshot mode which has to be physically switched. I have a servo which completes this function based upon LDR readings. With the kind help of fellow Arduino forum users I have some ideas for improving the LDR code however it does function at present.
My issue is with the record and stop recording process. I can read the PIR sensors (trigger = HIGH) and activate RECORD, however I cannot get the unit to stop recording when the signal from the PIR is low. I have spend many hours playing with while loops, if loops etc to monitor PIR and change values. I think the problem stems from the apparent lack of LANC code to read current camera State?.
I had thoughts on maybe adding one to a variable each time RECORD function is triggered, assuming then that if the variable is odd number then means its recording and even not recording.(based upon the variable being reset to 0 upon the whole unit powering up).
I have considered a timer function of say 30 seconds from initial RECORD instruction, said period of time being reset if the PIR sensor triggers HIGH. However all to no avail.
I have spent in excess of 14 hours now "fighting" this problem and for the sake of my sanity am now hoping i can "purchase" some help! (assuming this is not breaking any forum rules?) . I am proposing a payment (by paypal only) of £15 (I would image for 20 mintues work for the right person!) for the first person who can provide me with functioning code to achieve my goals as stated above (I know this seems a cop out but I really cant afford to spend another 14 hours trying to get this right). I hope to learn and understand the functioning from the code provided.
I am happy to provide any info needed on the arduino pins etc. I would of course try the submitted code and if it works make the payments stated. I am happy to donate it to a charity if that is so desired The code would be posted in reply to me or to my email address hecmac@o2.co.uk
I hope this is not in violation of any forum rules,
kind regards
Hec
Moderator edit: session ID removed