Keep Thinking.![]()
Thank you Darrel, mister_e and Joe S. for so much help on this project. I have a working gate operator now as seen at http://boogerdigger.com/gate1.htm using this code (attached zip file). I hope putting up a link is not against the rules. If so, let me know and I won't do it again.
There are 2 things that I want to add to my driveway gate:
1) a way to add and delete a user code with the keypad instead of reprogramming the PIC. I have failed at this countless times now. Please give me some direction if you can.
2) add two cameras to take a picture of the view from the keypad area (to capture the face of a possible intruder) and one to capture the license plate of the vehicle (a possible help for the less-than-zealous local police department). As the front gate is a long way from my building - about 200 feet or so, I'll need to store the pictures on some form of removable media although I haven't excluded wireless.
I think I'll work on #2 now as my brain is hurting from #1.
If anyone has any suggestions on either the change code or the camera please let me know.
Last edited by lester; - 21st February 2007 at 17:46. Reason: updated attachment on behalf of lloyd778
In my previous post (above), I failed to add a few comments to the Gate1.zip file. You'll notice that it won't compile with keypad1.bas. Just remove the "1" and it should be fine. Shame on me for modifying the original file for a different app and then renaming yet another original with the "1". Confusion to the enemy or is it simply the confussion of my mind?
I do get a Warning[221] when I complie. ...gate1.asm143:Invalid message number (230). Dawged if I can figure this one out but the programs runs just fine.
Can't hardly wait to Eagle up a PCB for this project. Better wait a bit more as I just keep adding a bell here and a whistle there.
Someone say whistle? Hum, the bad guys enter the wrong code and a very loud siren blasts away. More humane than 6000 volts through keypad. Like that, a lot.
If i use the suggested PIC16F877A... it compile just fine.. no warning no nothing here.
Warning 230: __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG.
so you're using a PIC18Xxxxx device. You have few choices
- leave it like this... anyway it's a WARNING
- you add @ ERRORLEVEL -230 at the top of your code
- you use the new CONFIG syntax
- you update your PBP version to 2.47... which take care of it.
Last edited by mister_e; - 22nd February 2007 at 00:18.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
@ ERRORLEVEL -230 was at the top of the code. When I commented it out the warning went away and I got a clean compile. I love it all clean like that. Thanks mister_e!!
Attached files are the cleaned up Gate1_1 code with no compile warnings and the origional KeyPad include reference restored. Also included is the KeyPad.bas file ready made. Just copy the unzipped KeyPad.bas file into your - I suppose - c:\program files\mecanique\mcs folder and you should be good to go. Play with it for a while and when you figure out how to change the user code with the keypad please share with the rest of us.
How about using the same method as home alarm already use?
You have 1 master code (service code), once you have enter it, you jump to a specific routine.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Yes, mister_e, that is exactly the line that I must follow.
Bookmarks