JoseCorreaMorales / rfidAPI

💳 The RFID REST API is a system that leverages various technologies, including PHP, MySQL, and Arduino, to manage data related to RFID cards and RFID sensors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RFID REST API

The RFID REST API is a system that leverages various technologies, including PHP, MySQL, and Arduino, to manage data related to RFID cards and RFID sensors. The detailed description is as follows:

PHP Icon REST API Icon MySQL Icon RFID Cards Icon RFID Sensors Icon Arduino Icon

Arduino

rest.ino is an Arduino sketch that utilizes an ESP32 microcontroller to communicate with a REST API. It includes functionality for sending HTTP requests with an authorization header, parsing JSON responses, and displaying information on an LCD screen.

Usage

To use rest.ino, an ESP32 microcontroller and an LCD screen need to be connected. Also, a REST API that accepts HTTP requests with an authorization header and returns JSON responses is required.

Once the hardware is set up and the REST API is configured, upload rest.ino to the ESP32 using the Arduino IDE. The sketch will run automatically when the ESP32 is powered on.

When the sketch runs, it reads RFID tag data from a connected reader and sends an HTTP POST request to the REST API with the tag ID. If the request is successful, the sketch parses the JSON response and displays information about the transaction on the LCD screen.

RFIDBD

RFIDBD is an SQL database designed for managing RFID-related data. It includes tables for users, movements, and balances, and can be used to track RFID tags and their associated transactions.

ER DIAGRAM

Installation

To install RFIDBD, a SQL server needs to be installed on localhost. Then, run the rfidbd.sql script to create the necessary tables and constraints.

Usage

Once the database is set up, it can be used to store and retrieve RFID data. The users table includes information about each user, including their ID and name. The movements table includes information about each transaction, including the user ID and transaction amount. The balances table includes information about the balance of each user.

To use the database, write SQL queries to insert, update, and retrieve data. For example, to insert a new user, run the following query:

INSERT INTO users (name) VALUES ('John Doe');

To retrieve the balance of a user, run the following query:

SELECT balance FROM balances WHERE userid = 1;

About

💳 The RFID REST API is a system that leverages various technologies, including PHP, MySQL, and Arduino, to manage data related to RFID cards and RFID sensors.

License:MIT License


Languages

Language:C++ 52.2%Language:PHP 47.8%