Final Report
Final Report
INTRODUCTION
1.1 Introduction
1.3 Objectives
1.1 Introduction
1
1.2 Problem Statement
In traditional attendance systems, attendance marking is often done manually, which is both time-
consuming and prone to human errors. Manual systems can lead to several issues, such as:
Additionally, manual systems lack transparency and real-time communication, leaving parents
uninformed about their child's attendance status until much later. In educational institutions, where
regular monitoring of attendance is crucial for academic success, there is a pressing need for a more
reliable and automated solution that ensures accuracy, saves time, and provides instant communication
with parents.
Fig 1.1 Manual attendance System Fig. 1.2 RFID Attendance System
1.3 Objectives
This project aims to address the limitations of traditional attendance systems by implementing a Smart
Attendance System using RFID technology and an ESP32 Wi-Fi module. The main objectives include:
Automation of Attendance Marking: By integrating RFID cards with an Arduino-controlled setup, the
system eliminates manual errors and ensures that every attendance is accurately recorded.
Real-time Notifications: Using Node.js with Node mailer, the system sends instant email notifications
to parents whenever their child marks attendance, ensuring real-time updates.
Secure Data Storage and Management: Attendance data, including student IDs, names, registration
numbers, and timestamps, is securely stored in MongoDB, ensuring easy access and organized record
2
Data Visualization for Insights: A Web Portal dashboard is designed to present attendance data
visually, providing key metrics such as the number of classes attended, semester-wise performance, and
individual attendance trends. This helps institutions monitor and analyze attendance efficiently.
The Smart Attendance System brings several benefits that address the inefficiencies of traditional
methods:
Time Efficiency:
The system automates the entire attendance process, saving time for teachers and administrative
staff.
It reduces the need for manual entries and repetitive tasks, streamlining attendance management.
Real-time Communication:
Parents receive instant email updates, enhancing transparency and building trust between
institutions and families.
This real-time feedback allows parents to act promptly in case of absenteeism.
The Web Portal dashboard provides comprehensive insights into student attendance patterns,
semester performance, and individual trends.
Institutions can use this data for identifying at-risk students, planning interventions, and
improving overall attendance rates.
This system can be scaled and adapted for use in schools, colleges, and workplaces, making it a
versatile solution for attendance management.
Its automated nature ensures that it can handle large-scale data with minimal manual
intervention.
By combining IoT technology, data analytics, and real-time communication, the Smart Attendance
System not only simplifies attendance management but also enhances the overall educational experience
for students, parents, and institutions.
3
CHAPTER - 2
LITERATURE REVIEW
2.1 Overview of Existing Attendance Systems
2.3 Benefits of Integrating MongoDB and Web Portal for Data Management and
Visualization
Agarwal & Gupta [2] proposes a cloud-based attendance system that combines RFID tags for user identification
with facial recognition for additional security. The system utilizes an Arduino Uno to collect data from RFID
readers and a camera module for facial recognition. The data is then transmitted to a cloud server for storage and
analysis. This approach offers enhanced security and eliminates the possibility of buddy punching (having
someone else sign in for another person. A.A. Olanipekun et al. developed an RFID-based automatic attendance
system using VB.net and Microsoft Access database [3]. Students have RFID tags attached to their ID cards, and
a serial connection is maintained between the RFID reader and computer system. The system allows
administrators to view and retrieve student information without difficulties. Hasanein D.Rjeib et al. developed an
RFID-based attendance system using an RFID tag and reader, connected to an Arduino microcontroller, and
stored in a web server using PHP and MySQL. The admin can view student documents and details [5].
Srivignessh PSS et al. developed a two-factor automatic attendance system using RFID and Pose Invariant Face
Verification [5]. The system uses RFID tags to identify students, and faces to verify attendance. This system
reduces identity theft and fraud in attendance management. Moth Myint Thein et al. [7] developed a Students'
Attendance Management System using RFID and Fingerprint Readers. The system uses two-factor verification,
with RFID readers connecting to computers and software for automatic attendance measurement. Students
register RFID tags and fingerprints, which are verified by the RFID reader. Attendance is stored in a server, and
administrators can view, edit, and delete the system. This secure and efficient system mitigates fraud risks. S. M.
Anzar, (Member, IEEE) et al. introduces the Random Interval Attendance Management System (RIAMS), an
innovative solution for virtual learning attendance monitoring [4]. It uses a face recognition module and two
ancillary modalities to enhance student engagement. The system's randomness ensures enhanced attention and
engagement. Teachers can customize their attendance strategy for each course. The system's effectiveness and
reliability are highlighted through output analysis and combined results. Sandhya Konatham et al. [] proposed a
system that working with RFID and GSM. Here they have used microcontroller (LPC) as an intermediate 5 amid
GSM module and RFID. Whenever students enter the classroom, they need to use their tag which read by RFID
reader and it send to the present signal to GSM module. If the ID of the tag does not match with database it
considered as unauthorized access. If it is okay then GSM module send massage administration and parents. [8].
Rani & Sharma This review paper explores various RFID-based attendance management systems. It discusses
the advantages of RFID technology, including contactless identification, improved accuracy, and faster data
collection compared to manual methods. The paper also highlights the potential benefits of cloud integration for
real-time data access and remote monitoring of attendance records [14].This project proposes a cloud-based
attendance system that leverages RFID tags for user identification and fingerprint recognition for added security.
The system utilizes an Arduino Uno to collect data from RFID readers and a fingerprint scanner. The data is then
transmitted to a cloud server for storage and analysis. This approach offers a two-factor authentication system,
potentially reducing the risk of unauthorized access [15]. This project focuses on the design and implementation
of a low-cost RFID attendance system using an Arduino Uno and an RFID reader. The system stores attendance
data locally on an SD card within the Arduino. While cloud integration is not included, this project demonstrates
the core functionalities of an RFID-based attendance system with a focus on cost-effectiveness [16].
4
2.1 Overview of Existing Attendance Systems
Traditional attendance systems, predominantly manual, involve recording attendance on paper or
through manual entry into digital systems. These methods are labor-intensive, prone to errors, and
susceptible to manipulation. To address these challenges, automated attendance systems have been
developed, utilizing technologies such as biometrics, QR codes, and RFID.
RFID-Based Systems: Radio Frequency Identification (RFID) technology has been widely adopted for
attendance management due to its efficiency and ease of use. In RFID-based systems, individuals carry
RFID tags, which, when scanned by an RFID reader, record their attendance automatically. This method
reduces manual errors and speeds up the attendance process. Studies have demonstrated the
effectiveness of RFID in automating attendance tracking, enhancing accuracy, and minimizing
fraudulent entries.
IoT Integration: The integration of RFID with Internet of Things (IoT) platforms has further enhanced
attendance systems. IoT-enabled RFID systems allow real-time data transmission to centralized
databases, facilitating immediate access to attendance records and enabling features like instant
notifications to stakeholders. Research indicates that IoT-based RFID attendance systems improve data
management and provide scalability for large institutions.
Automation and Efficiency:IoT devices, such as RFID readers connected to microcontrollers like the
ESP32, can automatically record attendance data and transmit it to cloud-based storage without human
intervention. This automation reduces administrative workload and ensures timely and accurate data
collection.
Scalability and Integration:IoT-based systems are highly scalable and can be integrated with other
digital platforms, such as email services for notifications and data visualization tools for analysis. This
flexibility makes IoT an ideal framework for developing comprehensive attendance management
solutions.
5
2.3 Benefits of Integrating MongoDB and Web Portal for Data Management
and Visualization
Effective data management and visualization are crucial components of an efficient attendance system.
Integrating tools like MongoDB and Web Portal offers several advantages:
MongoDB:
Web Portal:
Advanced Data Visualization: Web Portal provides sophisticated tools to create interactive
dashboards and reports, transforming raw attendance data into insightful visual representations.
Data Analysis: With features like data modelling and trend analysis, Web Portal helps in
identifying patterns, such as attendance trends over time, which can inform decision-making.
Customizable Reports: Users can tailor reports to meet specific needs, focusing on particular
metrics or time frames, enhancing the utility of the data presented.
Integrating MongoDB and Web Portal into an IoT-based RFID attendance system streamlines data
management and enhances the analytical capabilities of the system. This integration leads to more
informed decisions, improved transparency, and a better understanding of attendance behaviours within
the institution.
In summary, the evolution of attendance systems from manual methods to automated, IoT-enabled
solutions has significantly improved efficiency, accuracy, and transparency. The incorporation of RFID
technology facilitates seamless data capture, while the integration of tools like MongoDB and Web
Portal enhances data management and visualization, providing comprehensive insights into attendance
patterns.
6
CHAPTER - 3
METHODOLOGY
Card Scanning:
The ESP32 processes the captured RFID data and matches it with the student database stored in
its memory.
If a valid ID is found, it triggers the next steps (attendance marking, display, and notification).
The ESP32 Wi-Fi Module reads the processed RFID data from Arduino and prepares it for
transmission.
Using its internet connectivity, the ESP32 sends the data (ID, Name, IN/OUT timestamp) to the
MongoDB API, ensuring secure and instant storage of attendance records.
Feedback Mechanisms:
The 20x4 LCD Display shows the student’s name and attendance status (e.g., "Attendance
Marked").
A buzzer and LED provide auditory and visual confirmation, ensuring smooth operation.
7
Installing Node.js:
Install Node.js to serve as the backend environment for processing attendance notifications
Dependencies:
Write a script in Node.js to format attendance emails with the student’s details (e.g., Name, ID,
Date, Time, Attendance Status).
Example email content:
o Subject: "Attendance Confirmation for [Student Name]"
o Body: "Dear Parent, your child [Student Name] has been marked present on [Date] at
[Time]."
Triggering Emails:
When the RFID data is sent to Google Sheets, the same data is used to trigger an email
notification via Nodemailer.
This ensures that parents receive real-time updates.
Create a Google Sheet with columns to store attendance data, such as:
o ID: Unique identifier for the student.
o Name: Student’s name.
o RG No: Registration number.
o IN (Time & Date): Check-in time and date.
8
o OUT (Time & Date): Check-out time and date.
Script Implementation:
Write a Python or JavaScript script to send RFID attendance data to MongoDB using the API.
The script ensures each record is appended with accurate timestamps for attendance logs.
Data Transmission:
The ESP32 module sends the processed attendance data to the MongoDB API.
The API appends the data to the sheet in real-time, maintaining an organized and structured
format.
Data Updates:
The system automatically updates "IN" or "OUT" timestamps based on the RFID card scan,
ensuring accurate logs.
Importing Data:
Open Web Portal and use the MongoDB connector or download the Google Sheet as an Excel
file.
Import the attendance data into Web Portal for visualization.
Data Transformation:
Clean and transform the data using Power Query to ensure it is ready for analysis.
Format fields like dates, times, and student names for consistency.
9
Creating Dashboards with Attendance Trends, Individual Student Reports, and Overall
Analytics:
Number of Attended Classes: Track the total number of days each student has attended.
Semester Performance:Analyze attendance trends for specific semesters.
Individual Trends: Show attendance patterns for each student over time.
Interactive Visualizations:
Line Charts: Display daily or weekly attendance trends for the entire class.
Bar Graphs: Compare attendance rates among students.
Cards or Tiles: Highlight important KPIs like average attendance rate, top-performing students,
etc.
Report Sharing:
Publish the dashboard to the Web Portal Service to share insights with teachers, parents, or
administrators.
Enable real-time updates by connecting Web Portal to the live Google Sheet.
This methodology ensures a seamless integration of hardware, software, and visualization tools to create
a smart and efficient attendance management system.
10
3.5 Flowcharts of the Hardware System
11
3.5 Flowcharts of the Software System
12
CHAPTER - 4
RFID Card: Each student is assigned an RFID card that contains a unique ID for individual
identification.
13
RFID Reader (RC522): This module scans RFID cards and extracts the unique ID, which is
used to identify the student.
Acts as the communication bridge between the hardware and cloud services.
Transmits attendance data from the RFID reader to MongoDB using Wi-Fi.
Manages the hardware setup, including the RFID reader, buzzer, LEDs, and LCD display.
Ensures proper communication between components and performs actions based on input from
the RFID reader
14
Displays the name, ID, and attendance status of the student upon scanning the RFID card.
Peripheral Components:
Jumper Wires and Breadboard: Connects all components in a compact and organized manner.
Buzzer and LED Lights: Provides audible and visual feedback when a card is scanned.
15
5V Power Supply: Supplies power to the esp32, RFID reader, and ESP32.
Software:
Arduino IDE:
Used to write and upload the code to the Arduino and ESP32 modules.
Handles RFID card scanning, data transmission, and LCD display output.
MongoDB API:
Web Portal:
16
4.3 System Workflow
The workflow of the Smart Attendance System is designed for seamless operation, from scanning an
RFID card to generating a detailed dashboard. Below are the step-by-step details:
When a student taps their RFID card on the RC522 RFID Reader, the unique ID stored on the
card is read.
The ESP32 processes the scanned ID and verifies the student’s details.
The ESP32 Wi-Fi Module retrieves the scanned data and prepares it for transmission.
The module ensures reliable communication with the internet for data transfer.
Using the MongoDB API, the attendance data (ID, Name, RG No, IN/OUT timestamps) is
transmitted and stored in a structured format in Google Sheets.
After the attendance is recorded, a Node.js server processes the data and triggers an email
notification to the parent’s registered email address using Nodemailer.
The email contains details such as the student’s name, ID, and attendance status (present or
absent).
The MongoDB data is linked to Web Portal, where it is used to create an interactive dashboard.
The dashboard includes the following insights:
o Total classes attended by each student.
o Semester-wise attendance performance.
o Trends and patterns in attendance over time.
17
This visualization helps administrators and teachers monitor attendance effectively.
Automation: Eliminates manual attendance marking, ensuring accuracy and reducing errors.
Real-time Updates: Parents receive instant notifications about their child’s attendance status.
Data Security: MongoDB ensures secure and centralized data storage.
Insightful Analysis: Web Portal provides actionable insights, enabling informed decision-
making.
Scalability: The system can be easily scaled for larger institutions or workplaces.
This system not only streamlines attendance management but also fosters transparency and improves
communication between institutions and families.
18
CHAPTER - 5
5.a Admin Panel , 5.b Students , 5.c Manage Subject , 5.d Attendance Report
5.e Attendance Log
Results
The results section provides insights into how the system operates and the outputs generated at various
stages, from data collection to visualization. Below is a breakdown of the key results based on your
project:
The Smart Attendance System worked well with the ESP32 controlling all parts. The RFID reader
scanned cards, the LCD showed status, and the buzzer gave sound alerts. All components were
connected using a breadboard.
19
5.2 Software Results
The software part of the Smart Attendance System includes an easy-to-use Admin Panel. It lets the
admin manage students, subjects, and view attendance records. The panel has four main sections:
Students, Manage Subject, Attendance Report, and Attendance Log. Each section works smoothly,
helping the admin easily check and update attendance data. The interface is simple and user-friendly.
5.b Students
The Students section of the software shows a list of all registered students with their photo, name, ID,
email, branch, and batch. It includes a search bar and filter options like batch, branch, attendance, and
SGPA. The system works smoothly and makes it easy for the admin to find and manage student details
quickly.
20
5.c Manage Subject
Subject Manager is a simple tool to add, edit, and delete subjects with details like name, code, semester, time, and
day. It helps manage class schedules easily in one place.
The Attendance Report shows how many students are present in each subject. You can also see student details
like name and RFID. It's simple and helpful for daily tracking.
21
5.e Attendance Log
The Attendance Log software shows full details of each student's attendance, including name, subject,
time, date, semester, and day. It also displays the student's photo. This helps in keeping a proper record
of who attended which class and when, in a clear and simple way.
22
CHAPTER - 6
CONCLUSION
In conclusion, the Smart Attendance System developed using RFID technology and integrated with
ESP32, Node.js, Google Sheets, and Web Portal offers an automated, efficient, and scalable solution for
attendance management. The use of RFID cards for individual identification ensures accuracy in data
collection, while the ESP32 module enables real-time data transmission over the internet. By leveraging
MongoDB for data storage and integrating Web Portal for data visualization, the system provides easy-
to-understand reports and dashboards that are beneficial for monitoring attendance trends and
performance.
The implemented system brings substantial benefits to educational institutions and workplaces by
simplifying attendance management and reducing the errors associated with manual processes. The real-
time communication with parents through email notifications ensures that they are kept informed about
their child’s attendance, thus fostering better communication and transparency between parents and the
institution. Furthermore, the automated data storage and visualization capabilities allow for easy
tracking of individual attendance patterns, providing valuable insights into student engagement and
performance.
This system has the potential to be expanded further, incorporating mobile app integration and AI-based
analytics for trend prediction, which would enhance the overall functionality and usefulness for both
educational institutions and families. The solution is easily adaptable to various sectors, making it a
versatile tool for attendance tracking across different environments.
23
CHAPTER - 7
FUTURE SCOPE
7.1 Advantages
7.1 Advantages
Real-time Communication with Parents: One of the key advantages of this system is its ability to
provide real-time communication with parents. As soon as the student's attendance is marked, an email
notification is sent to the family members, ensuring they are immediately informed about the student's
presence or absence. This enhances transparency and allows for better communication between the
institution and the family. The timely notifications help parents stay updated on their child’s attendance
and can aid in ensuring that students do not miss any important sessions.
Automated Data Storage and Visualization: The use of MongoDB for storing attendance data ensures
that all records are kept in an organized and secure manner. The system automatically logs data such as
the student’s ID, name, and the timestamp of when they checked in and checked out. This minimizes the
possibility of human errors in data entry and provides a reliable, real-time record of attendance.
Furthermore, the integration with Web Portal for visualization allows for the creation of insightful
dashboards that display trends, individual student reports, and overall class performance. This provides
24
valuable insights for teachers and administrators to track student participation and performance over
time.
API Rate Limits: Another challenge encountered was the limitation imposed by APIs, particularly the
MongoDB API, which enforces rate limits on the number of requests that can be made in a given period.
This sometimes led to delays in logging attendance data, especially when the system experienced high
traffic. Efficient error handling and managing API requests within the rate limits were important to
ensure data consistency and prevent errors during high-volume attendance logging. Optimizing API
requests and ensuring that multiple users could interact with the system simultaneously without
exceeding these limits was essential to the smooth operation of the system.
Use of AI for Attendance Trend Prediction: Another potential enhancement is the use of Artificial
Intelligence (AI) to predict attendance trends. By analyzing historical attendance data, AI could be used
to predict patterns such as potential absenteeism or early warning signs of disengagement. This could
allow institutions to proactively address attendance issues before they become significant, improving
overall student retention and engagement. AI-based analytics could also help in identifying patterns and
trends in attendance, which can aid in decision-making processes for both academic and administrative
planning.
25
Fig. 7.1 future scope of RFID Technology
REFERENCES
Journals:
[1] Oladiran, O. E., & Afolabi, O. J. (2014). Attendance Management System Using Radio Frequency
Identification (RFID) Technology. International Journal of Computer Applications, 99(14), 22-27.
https://www.researchgate.net/publication/280558358_RADIO_FREQUENCY_IDENTIFICATION_RFID_BASE
D_ATTENDANCE_SYSTEM_WITH_AUTOMATIC_DOOR_UNIT
[2] Rani, R., & Sharma, R. (2016). A Review on Attendance Management System Using RFID Technology.
International Journal of Advanced Research in Computer and Communication Engineering, 5(2), 142-146.
https://www.researchgate.net/publication/235598499_RFID-Based_Students_Attendance_Management_System
[3] Ding, K., Jiang, P., IEEE/CAA Journal of Automatica Sinica, Vol. 5, No. 1, 2017, pp. 128–138.
[4] Anzar S.M., Subheesh N. P., Panthakkan A, Malayil S, Al Ahmad H, “Random Interval Attendance
26
Management System (RIAMS): A Novel Multimodal Approach for Post-COVID Virtual Learning” , in IEEE
EDUCATION SOCIETY SECTION , June 2021 Volume 9.
Conferences:
[5] Irawan, J.D., Prasetio, S. and Wibowo, S.A., “IP based module for building automation system”, In:
Proceedings of Second International Conference on Electrical Systems, Technology and Information 2015
(ICESTI 2015). F. Pasila, Y. Tanoto, R. Lim, M. Santoso, N. Pah (Eds), Singapore: Springer (2016). pp. 337–343
[6] Srivignessh P, Bhaskar.M, “RFID and pose invariant face verification based automated classroom attendance
system” ,in Conference: 2016 IEEE International Conference on Microelectronics, Computing and
Communications (MicroCom)
[7] Nguyen, H.M., Kim, S.H., Le, D.T., Heo, S., Im, J. and Kim, D., “Optimizations for RFID-based IoT
applications on the Cloud”, 5th International Conference on the Internet of Things, Seoul, South Korea, 2015
[8] Dorris, K. (2016, April 12). What is the Internet of Things (IoT)? . Internet of Things Agenda.
https://www.techtarget.com/iotagenda/blog/IoT-Agenda
[9] Gubbi, P., Buyya, R., Sun, S., & Marusic, S. (2016). Internet of Things (IoT): A vision, conceptual
framework, and research directions. Journal of Network and Computer Applications, 81, 166-184.
https://doi.org/10.1016/j.jnca.2016.01.008
[10] Lee, I., & Lee, K. (2015). The Internet of Things (IoT): Applications, challenges, and opportunities.
Convergence Information Technology, 8(4), 270-279.
[11] Shi, W., Zhang, G., Xu, L., & Li, Y. (2018). Edge Computing: A Survey of the Edge Platform and the
Applications. ACM Computing Surveys (CSUR), 51(5), 1-29.
[12] Anthi, H., Nikos, I., George, M., & Dimitrios, V. (2018). A Survey on IoT Communication Architectures and
Protocols. Journal of Network and Computer Applications, 136, 11-37.
https://doi.org/10.1016/j.jnca.2018.11.004
[13]Agarwal, A., & Gupta, P. (2019). A Cloud-Based Attendance Management System Using RFID and Face
Recognition. International Journal of Advanced Research in Computer Science and Software Engineering, 9(7),
18-23.
https://www.academia.edu/40635401/Cloud_based_employee_attendance_management_system_using_NFC_and
_Face_Recognition
[16]Abd Rahman, N. H., Mat Nawi, N. A., & Mohamad, R. (2014). Design and Implementation of a Low-Cost
RFID Attendance System. ARPN Journal of Engineering and Applied Sciences, 9(14), 2068-2073.
[18] NXP Semiconductors. (n.d.). MFRC522: Near Field Communication (NFC) and Mifare Reader IC. [Product
datasheet]. https://www.nxp.com/products/rfid-nfc/nfc-hf/nfc-readers/standard-performance-mifare-and-ntag-
frontend:MFRC52202HN1
[19] Arduino Project Hub. (n.d.). MFRC522 RFID Module with Arduino.
27
https://m.youtube.com/watch?v=pdBrvLGH0PE
[21] C. Contributor, "Fritzing - A Fabulous Educational Tool," Instructables, 2013. [Online]. Available:
https://www.instructables.com/Fritzing-a-fabulous-educational-tool/.
The following books, articles, and online resources were referred to during the development of this
project:
Books:
1. "RFID Handbook: Fundamentals and Applications in Contactless Smart Cards, Radio Frequency
Identification, and Near-Field Communication" by Theo, R. D. (2010).
2. "Learning Node.js Development" by Andrew Mead (2016).
Articles:
Online Resources:
1. Node.js Documentation
2. Web Portal Integration with MongoDB (2021)
3. ESP32 Overview and Documentation
APPENDICES 1
ESP32 Code for RFID Integration: This code enables the RFID reader to scan cards, read the data,
and send the attendance information to MongoDB via Wi-Fi using the ESP32 module.
Node Mailer Code for Email Notifications : Email notifications are sent to family members or
designated recipients whenever attendance is marked which is send by Nodemailer.
28
1. Connect MongoDB to Web Portal : Use the "Web" connector in Web Portal.
2. Load Data: Select the MongoDB API URL and load the data into Web Portal.
3. Dashboard Creation: Create a dashboard with key metrics such as attendance trends, semester
performance, and individual student reports.
1. Circuit Diagram: A diagram showing the connections between the RFID reader, ESP32, and
Arduino.
2. Flowchart: A flowchart of the entire attendance process from RFID scan to email notification
User Manual
The user manual will guide you through the steps for setting up the system:
This project provides an efficient and scalable solution for automated attendance tracking with real-time
notifications, ensuring seamless data storage, visualization, and communication.
APPENDICES 2
Software Implementation
The software side includes programming the hardware, data transmission, and email notifications.
#include <WiFi.h>
29
#include <HTTPClient.h>
#include <SPI.h>
#include <MFRC522.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define SS_PIN 21
#define RST_PIN 22
#define GREEN_LED 4
#define RED_LED 5
#define BUZZER 2
void setup() {
30
Serial.begin(115200);
rfid.PCD_Init();
pinMode(GREEN_LED, OUTPUT);
pinMode(RED_LED, OUTPUT);
pinMode(BUZZER, OUTPUT);
lcd.init();
lcd.backlight();
WiFi.begin(ssid, password);
lcd.setCursor(0, 0);
lcd.print("Connecting WiFi");
delay(500);
Serial.print(".");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("WiFi Connected");
delay(1000);
lcd.clear();
31
void loop() {
uidStr.toUpperCase();
if (studentName == "") {
lcd.clear();
lcd.setCursor(0, 0);
lcd.setCursor(0, 1);
lcd.print("Attendance Failed");
digitalWrite(RED_LED, HIGH);
delay(1000);
digitalWrite(RED_LED, LOW);
32
return;
lcd.clear();
lcd.setCursor(0, 0);
lcd.setCursor(0, 1);
lcd.print(studentName);
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
http.begin(serverUrl);
http.addHeader("Content-Type", "application/json");
digitalWrite(GREEN_LED, HIGH);
lcd.setCursor(0, 1);
delay(1000);
digitalWrite(GREEN_LED, LOW);
33
} else {
digitalWrite(RED_LED, HIGH);
lcd.setCursor(0, 1);
delay(1000);
digitalWrite(RED_LED, LOW);
http.end();
} else {
lcd.setCursor(0, 1);
rfid.PICC_HaltA();
rfid.PCD_StopCrypto1();
APPENDICES 3
34
function doGet(e) {
constnodemailer = require("nodemailer");
35
to: "parent_email@gmail.com",
36
37
38
39
40
41