Hi, i am currently working on a dispenser unit using arduino uno that links an mfrc522 rfid module with a small servo and. One thing i would like to do is create a time delay between the use of each individual rfid tag. for example, every 8 hours the tag will be readable but during that 8 hour waiting time it will deny access. I am new to arduino, so i am unsure if a rtc module is necessary either. if anyone can tell me if this is possible or direct me to more information that would be greatly appreciated.
How accurate must the 8 hour period be ? Would say 10 minutes either way matter ?
How many tags will be used ?
You could save the value of millis() when the tag is read, one level for each tag, The next time the tag is read compare the current value of millis() with the start value, If 8 hours has not elapsed deny access, otherwise allow it and save the time again
Thanks for the reply,
The accuracy is not a problem in my case, however, would the time reset on restarting the arduino (say replacing a battery in the power source etc) or can the arduino board maintain the last known time in its memory?
That is why im wondering whether a RTC module is necessary to maintain time during battery replacement.
I will try the command after each rfid tag and see if that will work.
would the time reset on restarting the arduino (say replacing a battery in the power source etc) or can the arduino board maintain the last known time in its memory?
You cold save the start times to EEPROM so that they can be read at startup and/or when the card is read.
Even if you use an RTC for timing you will need to save the start times on the Arduino
That should hopefully answer my question, thank you so much for the help.