garage door with RFID
buckedup169
Posts: 8
so I've tried this a couple of times and its still not right. I have and RFID and 4 tags. i have the tags labeled Car A-D and my outputs labeled Door D-A all i am trying to do is when car A (tag 1) passes the RFID door A will go high (output 15), and then so on with the other 3 tags. i posted this on here once and someone did get back to me and got it close to working but not completely(attached, Garage door), i worked on it a little bit and got it closer i think(attached, Garage door2). I hope someone can get back to me and help me out.
thank you for your time and i hope to hear from someone
thank you for your time and i hope to hear from someone
Comments
so what works and what doesn't work? well on screen it tell me which tag has passed by (Tag A, B, C, or D) but as far as the outputs going high and low well that is the problem i am having i hope this better helps somene
thanks again
Assuming the DoorA is closed and tag1 is read, you set pin 15 high. But that is DoorA, and on the very next statement, you check if DoorA is 1 and make pin 15 low. So you are opening and closing the door so fast you can't see it. You need to modify the CASE statements so that the door is opened if it is currently closed and closes if it is currently open for each tag read.
Try this to see if it gives you the results you want:
And remove the IF statements from the CASE...SELECT. You are comparing an address to 1 which will never be true.
What do you have connected to DoorA - DoorD?
Chris i am sorry i tried replying to my orginal post but every time i tried i got some type of service error. and the problem with the program you gave me well on screen it tell me which tag has passed by (Tag A, B, C, or D) but as far as the outputs going high and low.. that part did not work .
i just want to say i am sure glad there is good people to lend a helping hand thank you all so much it means a lot!!
So I used your program Chris because it reads the tags slower than the one i made. however i used sapphire's toggle idea and it works 75%, it works almost as its suppose to. Car A (Tag1) turns on and off output 15, Car B (Tag2) turns on and off output 14, Car C (Tag3) turns on and off output 12, but Car D (Tag4) comes up Unauthorized. when i tried to that Unauthorized and Name 0 out of the program what happened was.... Tag1 readas car B and turned on and off output 15, Tag2 read as Car C and turned on and off output 14, Tag3 read as Car D and turned on and off output 12, and Tag4 came up as Car A and did not turn on and off any outputs.... i hope this is a good explination and is an easy fix thank you two very much for your help so far i am getting really excited about this project.
You would not want to remove the unauthorized tag routine from the program because then the program would always allow a tag. It needs to handle cases where the tag is wrong or the answer will always be right. I did not look at the toggle version you specify, however I did just test the code I have and it is working with 4 tags and could be expanded. However since you only specify 4 outputs I won't go past that. This attached version is verified. Not sure about it being slower...I used the demo code as a template to create this. The demo code plays a tone causing a small delay, however that command could be commented out. To use the attached code simply enter your tag data for Tag1-Tag4.