Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Zeeshan
Published

Contactless Attendance

Are you still using biometrics or swipe based attendance? If Yes then this solution is for you

IntermediateProtip20 hours8,412
Contactless Attendance

Things used in this project

Hardware components

Arduino MKR WiFi 1010
Arduino MKR WiFi 1010
×1
SparkFun RFID Reader
×1
RFID Writer
×1
LED (generic)
LED (generic)
×1
5 mm LED: Green
5 mm LED: Green
×1

Story

Read more

Code

Attendance hardware

C/C++
Upload this code to Arduino MKR wifi 1010
#include <SPI.h>
#include <WiFiNINA.h>
#include <SPI.h>
#include <MFRC522.h>

IPAddress myAddress = "http://www.mydatabase.com" //update your server here
WiFiClient client;

#define SS_PIN 10
#define RST_PIN 9

MFRC522 mfrc522(SS_PIN, RST_PIN);

void setup()
{
  SPI.begin();
  mfrc522.PCD_Init();
}
void loop(){
  emp_id=read_card();
  if (client.connect(myAddress, 80))
   {
     client.write(myAddress+"/attend.php?emp_id="+emp_id); //update php page name here and also replace emp_id with field name of employee id defined in database table
   }
}

String read_card()
{
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++) 
  {
     content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
     content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  return content;
}

Credits

Zeeshan

Zeeshan

13 projects • 50 followers
Creative and destructive design master. Ability to use the brain waves for both construction and destruction

Comments