Now we are going to learn about a new project. This project is based on fingerprint technology and IoT. Here, we will build a system that records student attendance using a fingerprint scanner and saves the data automatically to an IoT database.
Introduction
This project demonstrates how to create a fingerprint-based student attendance system integrated with an IoT database. The system uses a fingerprint sensor to identify students uniquely and mark their attendance automatically. The attendance data is then uploaded to an IoT platform, enabling remote access and management. This approach provides a reliable, secure, and automated way to track attendance, minimizing manual errors and saving time.
Materials
Arduino Uno or NodeMCU (with built-in Wi-Fi)
Fingerprint sensor module (e.g., R307 or GT-511C3)
LCD display (16x2) for local feedback (optional)
Software serial module (if using Arduino Uno)
Connecting wires and jumper cables
Power supply (5V)
IoT platform account (e.g., Blynk, ThingSpeak, Firebase)
Working Principle
The fingerprint sensor captures the fingerprint image when a student places their finger on the sensor. The microcontroller processes the fingerprint data to check if it matches any stored templates. If a match is found, the system records the attendance by storing the student ID and timestamp. This data is transmitted via Wi-Fi to the IoT database in real time. The LCD displays confirmation messages locally to the user. The IoT platform allows administrators to monitor attendance remotely and generate reports as needed.
CODE:
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
// WiFi credentials
char ssid[] = "YourWiFiSSID";
char pass[] = "YourWiFiPassword";
// Blynk auth token
char auth[] = "YourBlynkAuthToken";
// Fingerprint sensor connected to pins
SoftwareSerial fingerSerial(D5, D6); // RX, TX pins
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&fingerSerial);
BlynkTimer timer;
void setup() {
Serial.begin(9600);
fingerSerial.begin(57600);
Blynk.begin(auth, ssid, pass);
if (finger.verifyPassword()) {
Serial.println("Fingerprint sensor found!");
} else {
Serial.println("Fingerprint sensor not found :(");
while (1) { delay(1); }
}
timer.setInterval(2000L, checkFingerprint);
}
void checkFingerprint() {
getFingerprintID();
}
uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK) return p;
p = finger.image2Tz();
if (p != FINGERPRINT_OK) return p;
p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK) return p;
Serial.print("Fingerprint ID found: ");
Serial.println(finger.fingerID);
// Send attendance data to Blynk IoT platform
Blynk.virtualWrite(V1, finger.fingerID);
Blynk.virtualWrite(V2, millis() / 1000); // Timestamp in seconds
return finger.fingerID;
}
void loop() {
Blynk.run();
timer.run();
}