
Get full C++ & Python code + lifetime access
The ESP32 Smart Attendance System project introduces one of the most practical and popular applications of Internet of Things (IoT) technology: wireless contactless identification and local data logging.
In this project, an ESP32 microcontroller interfaces with an RC522 RFID reader to scan student ID cards, process unique card identifiers (UIDs), and provide instant audiovisual feedback. Instead of relying on third-party cloud platforms or external home Wi-Fi, the ESP32 acts as a standalone Wi-Fi Access Point and local Web Server, hosting a live, interactive web dashboard directly on your local network.
This project introduces:
WebServer.h)By completing this project, you'll understand how microcontrollers authenticate physical cards, communicate over SPI and I2C buses, and host independent web dashboards without needing an internet connection.
ESP32 DevKit V1 (30-Pin) × 1
RC522 RFID Module with RFID Cards/Tags × 1
16x2 LCD Display with I2C Backpack × 1
Active 5V/3.3V Buzzer × 1
5mm Green LED × 1
5mm Red LED × 1
220Ω Resistors × 2
Breadboard × 1
Jumper Wires × 1 Set
Micro-USB Cable × 1
Design Note: All connections are organized strictly along the Right Rail of the 30-pin ESP32 to maintain a neat layout for prototyping and filming.
Connect the RFID-RC522 module to the ESP32 SPI hardware pins:
3.3V (VCC) → ESP32 3V3 (Important: Do NOT connect to 5V)RST → ESP32 GPIO 4 (D4)GND → Breadboard GND RailMISO → ESP32 GPIO 19 (D19)MOSI → ESP32 GPIO 23 (D23)SCK → ESP32 GPIO 18 (D18)SDA (SS) → ESP32 GPIO 5 (D5)Connect the 4 pins of the I2C module backpack:
VCC → ESP32 VIN (5V from USB)GND → Breadboard GND RailSDA → ESP32 GPIO 21 (D21)SCL → ESP32 GPIO 22 (D22)Connect the alert indicators:
GPIO 17 (TX2) | (-) → GND RailGPIO 16 (RX2) via 220Ω resistor | (-) → GND RailGPIO 2 (D2) via 220Ω resistor | (-) → GND RailInside setup(), the ESP32 creates a local private Wi-Fi network (ESP32_Attendance) using WiFi.softAP(). It launches an internal HTTP server on port 80 to serve the HTML dashboard stored in index.h.
When an RFID card approaches the reader, the MFRC522 library reads its 4-byte UID over the SPI bus. The code compares this UID against registered student identifiers in memory.
The validated record (Name, UID, Status, and Timestamp) is saved to an internal data array. Connected client browsers fetch this data asynchronously every second via the /getData JSON endpoint, automatically updating the web table without reloading the page.
After uploading the code and powering the ESP32:
Smart Attendance / Tap ID Card...ESP32_Attendance.http://192.168.4.1 opens the live attendance dashboard.LCD Display Blank or Faded: Connect LCD VCC to VIN instead of 3V3, and adjust the blue contrast potentiometer on the back of the I2C backpack using a screwdriver.
RFID Card Not Detected: Verify that the RC522 is powered with 3.3V (not 5V) and ensure the SPI pins (D5, D18, D19, D23, D4) are seated firmly.
Web Dashboard Not Loading: Ensure your laptop or phone is connected to the ESP32_Attendance Wi-Fi network before opening http://192.168.4.1 in your browser.
Compiler Access Denied Error: Close background Arduino tasks in Task Manager, add an antivirus folder exclusion for the Arduino directory, and run the Arduino IDE as Administrator.
By completing this project, you have learned:
In the next project, you'll learn how to build an IoT Environmental Monitor using a gas sensor, Bluetooth Low Energy (BLE), and a custom web dashboard.