Im trying to make a lid that will close with a servo when ever a proper RFID tag is read. I want to put a lid on a dog food bowl so it will close when a dog that has the tag on its collar can't eat out of the bowl.
I am having serious difficulties in combining these two aspects and would really appreciate all the help I can get. I am very knew to all of this so its making things quite challenging.
First some general advice. This type of project calls for a method of programming called a state machine, do some googling and learn about them. Start with drawing a state diagram like the one below. This will keep you on the right track when coding problem start to be overwhelming. If you are new to this, do incremental testing. Make a plan of a number of sub goals to achieve like operate the servo, read the rfid, identify the rfid, make the states change and so on.
Now some specific advice, i believe you will need a photocell or similar that detects when the dog no longer is in the proximity of the bowl in order to make the state machine work properly. Also, in my experience dogs are intelligent enough to circumvent a contraption like this. You also should consider having the "right" dog to be able to open the lid instead of the other way round, this gives less unforeseeable issues