Set things up so when a pin is held HIGH at start-up the EEPROM is re-set to zeros. Then you should have a complete counting/storage system that can be re-set.
Now we have to think of something else for you to do![]()
Set things up so when a pin is held HIGH at start-up the EEPROM is re-set to zeros. Then you should have a complete counting/storage system that can be re-set.
Now we have to think of something else for you to do![]()
Dave
Always wear safety glasses while programming.
Gotcha......Set things up so when a pin is held HIGH at start-up the EEPROM is re-set to zeros. Then you should have a complete counting/storage system that can be re-set.
How about this for a quick diversion: How are we on using a PIC to drive a servo motor?Now we have to think of something else for you to do"
We've been getting a visitor to our garden late at night (we think it's a Badger) and would like to film it. I've got a FUTABA FP-5148 servo that I'd like to link up to a cable release to press the record button on a video camera after receiving an input from a PIR to the PIC.
The sequence is this:
1/ PIR 'beam' get broken by 'Creature'.
2/ PIC activates servo to move cable release out and turn camera on.
3/ PIC waits 10 secs while camera boots up.
4/ PIC activates servo again moves cable release out turns camera record on (same button).
The camera will record on it's own for 10 mins then powers down.
5/ If PIR been is still broken (creature still there) after 9min:30secs servo presses record button again.
6/ PIR beam 'closes' creature has gone, camera powers down.
What do you think mackrackit?
Dave
Sounds like fun...
But what do you do when you find out it is a badger... or not
Do you have the data sheet for the servo? PIR?
Dave
Always wear safety glasses while programming.
I hadn't considered the 'or not' option......But what do you do when you find out it is a badger... or not
Well the PIR is just using a set of normally open contacts.The actual PIR is 12V I don't have a data sheet but I'm thinking that if I use 5V on the N/O contacts with a resistor onto the PIC that should be alright (I hope).Do you have the data sheet for the servo? PIR?
The servo itself is a FUTABA FP5148 I don't have a data sheet for this either but I could email Futaba and ask for one (it's and old three wire job) I've looked on their website but all the product numbers have moved on so nothing to go on. It was for a model glider.
It probably an old version of one of these below:
http://www.futaba-rc.com/servos/servos.html
Not much for you to go on mackrackit I know, what do you think though worth a try?
Dave
Last edited by LEDave; - 12th May 2010 at 19:54.
Yip. Worth a try.
Someone here I am sure knows about this servo, voltage and things.
I will guess 5 volts will work.
PIR will be easy...
Dave
Always wear safety glasses while programming.
Ok the project's underway.
What were you thinking for the next 'Mission' mackrackit?
Last edited by LEDave; - 12th May 2010 at 20:36.
I was thinking something with ADC and LOOKUP tables. But have not really figured out a project yet.
Dave
Always wear safety glasses while programming.
Bookmarks