Hi, so I've got 4 RFIDs and whenever all the 4 of the RFIDs get the relay they move an engine. So, I want to do it by order. I mean - I want the engine to start moving only whenever the RFIDs were activated by an order of 1,2,3,4. How do I program it?
Simply remember which card you saw If you look around you can find many examples that use buttons in the right order. Just replace them by the cards you read.
The last RFID I saw was RFID zero.
If the RFID that has just gone off is the last one I saw + 1, then the last RFID I saw is this new one.
If the RFID that has just gone off is not the last one I saw + 1, then the last RFID I saw gets reset to zero.
If we reach number 4, then do whatever-it-is and reset to zero.
You need the concept of the state of the system. Suppose the desired order is 3,4,1,2.
Has it got a 3?
If it has a 3, is the next a 4?
If not, start over
It it has a 3 and a 4, is the next a 1?
etc
...R