RFID Safe

so i made an RFID safe...now i want to add some extra features. One of these features is the ability to add and remove authorized RFID tags. Currently, the authorized card's code is defined in the code itself. I wanted to have two buttons, one for add and one for remove.

here's what i was thinking:

If the add button were to be pressed, the next card to be read in the next 10 seconds would be added to the eeprom. after a card has been read (within the 10 seconds) or the 10 seconds have expired (without a card being read), the "add card mode" would end, meaning that the next card to be read would be used to allow or deny access to the safe (the code would check the card's code against the codes stored in eeprom; if it matches any of them, the safe opens.) The "remove card mode" would do the same thing, except it would remove cards from eeprom, instead of adding them (duh!)

the problem is, i don't know how to implement the above plan. Any help would be appreciated. if you have any questions, please ask

thanks

Sounds like you need a finite state machine.

leeamsi97: so i made an RFID safe...now i want to add some extra features. One of these features is the ability to add and remove authorized RFID tags. Currently, the authorized card's code is defined in the code itself. I wanted to have two buttons, one for add and one for remove.

here's what i was thinking:

If the add button were to be pressed, the next card to be read in the next 10 seconds would be added to the eeprom. after a card has been read (within the 10 seconds)

...anybody who knows this, and has any RFID tag, would have access to your (not so) safe. It's almost like sticking the combination, in plain sight, to the front of a combination lock safe.

Henry: the programming buttons would be inside the safe, not outside

It would not be safe because once one card is out it could be cloned....

leeamsi97: Henry: the programming buttons would be inside the safe, not outside

Then how do you propose to get the button cables into and out of the safe. Unless the safe is made of thin metal (again, not very safe), you'll never be able to drill through the walls of the safe. Some of the more secure safes have 4" thick, thermite-proof, walls...and you don't want to get your finger trapped in the door when you're closing one of those! =(