Code written by Lim Ngian Xin Terry (Software Guy) with assistance from Eswaran s/o Saravanan (Hardware Guy).
Built for the Arduino Uno.
Demo Video: https://www.youtube.com/watch?v=MoV-WNHIaI4
How to update Nominal Roll:
- In the SD card, there is a file called NR.csv. In it contains 3 columns.
- The 1st column contains the card's RFID numbers. Unless new cards are addd, there should not be any need to update this. Otherwise, simply type their RFID into this column.
- The 2nd column contains the personnels' names. The names MUST BE 10 CHARACTER(INCLUDING SPACES) OR BELOW! This is due to the hardware's RAM limitations! Recommended to use the names as shown on their uniforms.
- The 3rd column contains the last 4 digits of the personnels' NRIC.
- ANY SPACES ARE ALSO CONSIDERED A CHARACTER!
- DO NOT RENAME THE FILE!
- THE DEVICE CAN ONLY SUPPORT UP TO 20 PEOPLE MAXIMUM! (Arduino Uno RAM Limitation)
- If you are using a blank SD card, copy RAS/NR.csv, edit it and upload it to the root folder of the SD card.
How to read logs:
- All logs are stored in the SD Card's LOGS folder.
- The logs are stored in a text file with their date on it, in a YYYYMMDD format. For example, 20210629.txt would be the logs for the date 2021-06-29.
- The logs will store who is absent, signed in, signed out, and the time.
How to set time (When the clock module's battery has run out and changed):
- Connect the Arduino to your PC, and upload the TimeSet/TimeSet.ino file to it.
- Once upload is successful, IMMEDIATELY open the Serial to run the program.
- The time will be set to the time you compiled and uploaded the code.
- The shorter the time between you compiling and running the program, the more accurate the time will be.
- After updating the time, upload RAS/RAS.ino into the Arduino. You are good to go.
What is MidnightSet/MidnightSet.ino for?
- It is what I used to set the time to almost midnight to test if the midnight reboot works without issues. You should not need it.
Important Links (If you want to change the code or something.): This assumes that you have a fairly good knowledge in C++ or C programming.
- Where is this repository hosted? [https://github.com/TypeDefinition/RAS]
- What is a SPI? [https://www.arduino.cc/en/reference/SPI]
- What is the naming convention of files stored in the SD Card? 8.3 Filename. [https://www.arduino.cc/en/Reference/SDCardNotes]
- What is the SD Card Format? FAT16 & FAT32. [https://www.arduino.cc/en/Reference/SDCardNotes]
Important Notes:
- Do not power cycle or restart the device in the middle of the day!
- The signed in and signed out status for the personnel are reseted when the device reboots.
- The log file for the day is deleted and re-created each time someone signs in.
- This means that if person A signs in, and the device reboots, person A will be treated as absent. And when person B signs in, the log file is re-created, and person A will be logged as absent.
- The Arduino will automatically reboot at midnight everyday!
Additional Notes:
- The ArduinoIDE folder contains all that you need to compile and upload the code to the Arduino.
Hardware Components:
- Arduino Uno
- DS3231 Real-Time-Clock Module
- SD Card Module
- I2C LCD Module
- MFRC522 RFID Reader Module
- LED Lights