Click here to Skip to main content
15,883,860 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I came up with an interesting project with arduino and an RFID reader. I managed to send the RFID UID from the arduino to the C# program and I can store it in a file and I made a class too. And when a tag is read I can see in an a list view element when the tag was read. I have the log in time.

But I can not figure out how can I see when the tag was read second time and it would mean the employee is about tolog out.

What I have tried:

I tried with a lot of if statements but I realised it is not enough.
Posted
Updated 3-Apr-21 2:59am
v2
Comments
Richard MacCutchan 3-Apr-21 7:16am    
What about comparing the two times? Does that not provide the information that you need?
Member 15133370 3-Apr-21 7:53am    
Maybe it can but there are more than one tag.
The Other John Ingram 3-Apr-21 7:23am    
if the rfid tag number is not in the file he is logging in.
if the rfid tag number is in the file he is logging out.

write to the master file something like this
rfid tag nnnnn logged in at xxx and logged out at yyy

your going to have to deal with people who forget to login/off.
Member 15133370 3-Apr-21 7:51am    
Well this is a great idea!

Thanks, I will try something.
It could work if everybody would only once login/out.
The Other John Ingram 3-Apr-21 11:09am    
you might have to deal with on time login/logouts.
at one site per union agreements with management there was a 5 min window on login and logout. ie if you logged in at 7:55 to 8:05 you were still on time as if you logged in at 8;00, and if you logged out at 4:55 to 5:05 you still logged out at 5:00. This was because it took a while for 100+ people to logout/in at the beginning/ending of the day.

the master file was imported sometime after beginning of 1st shift for the previous days data into a update file which was imported after review into payroll. Yes, this got complicated fast. This used plastic id cards that had the employees id info barcoded on the back.
oh, by the way you are going to have to figure out how to handle employees that forget there rfid fobs, or worse loose them.

Yes you are going to have to create a file of valid rfid fobs and there owners.

good luck this gets complicated fast.

1 solution

It can get complicated, because not all people who log in will log out, and not everybody who logs out will have logged in. People are like that ...

Google will help you find a lot of existing examples you can learn from: Writing an attendance system C# - Google Search[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900