Giter Club home page Giter Club logo

attendancerfid's Introduction

Attendance using Rfid

RFID attendance system realized using MFRC522,MOSQUITTO MQTT (On Raspberry PI) ,GREEN RED LEDS and ESP8266

Overview

When user apply RFID card on the RC522 module, ESP8266 will detect presence of card and read the serial number. ESP is subscribed to the LEDS topics and will publish serial number and access(1 or 0) to the MQTT broker running on the Raspberry PI. The broker will receive uid and access from the ESP8266 then send them to the Flask web server which will render uid and access to html page and send two get requests to the broker using ajax to control LEDS depending on the access (authorized or not).

Demo

RFID attendance system using RASPBERRY PI MQTT ESP8266 RC522 and FLASK

Schematics

To complete this project you need these next components:

1x ESP8266 1x RC522 Sensor 1x 4700 Ohm Resistor 2x 470 Ohm resistors 2x LEDs (GREEN and RED)

alt text

Usage

Run and install Mosquitto broker on your Raspberry

pi@raspberry:~ $ mosquitto -d

Installing Flask
We’re going to use a Python microframework called Flask to turn the PC into web server. To install Flask, you’ll need to have python and pip installed.

pip install flask
pip install paho-mqtt

Installing SocketIO

pip install flask-socketio

Programming the ESP8266

For the ESP8266 to interact with the web server, you need to install PubSubClient library. This library provides a client for doing simple publish/subscribe messaging with a server that supports MQTT (basically allows your ESP8266 to talk with Python web server).

Installing the PubSubClient library

  1. (Click here to download the PubSubClient library) You should have a .zip folder in your Downloads folder

  2. Unzip the .zip folder and you should get pubsubclient-master folder

  3. Rename your folder from pubsubclient-master to pubsubclient

  4. Move the pubsubclient folder to your Arduino IDE installation libraries folder

The library comes with a number of example sketches. See File > Examples > PubSubClient within the Arduino IDE software.

Installing the MFRC522 sensor library
The MFRC522 sensor library provides an easy way of using MFRC522 sensor to read tags with your ESP8266 or Arduino boards.

  1. (Click here to download the MFRC255 sensor library) You should have a .zip folder in your Downloads folder

  2. Open Arduino IDE. Then go to and select Sketch->Include Library->Add .ZIP Library.

  3. Choose rfid-master.zip file and click to Open.

Uploading sketch

Finally, you can upload the full sketch to your ESP8266 (replace with your SSID, password and RPi IP address) which is in the arduino folder of the project

Launching the Web Server

Go to the root of the project folder and run this command

python app.py

Your web server should start immediately on port :8181!

contributors to this project : Joudari Alaeddine, Essemlali Oussama,Jaafar Ouadoudi

attendancerfid's People

Contributors

walidzbiri avatar

Stargazers

Attiq Aamir avatar  avatar  avatar  avatar Anas AIT BAHA avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

ans1genie al4din

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.