This repository contains the source code of our SmartGate Arduino IoT.
Intrance SmartGate works by using RC522 RFID module alongside ESP8266 microcontroller for wireless communication. We utilize ExpressJS as our backend system that communicates with our database. User's information are stored in MongoDB Atlas.
Below is the logic flow behind our system:
This project uses mongodb as the cloud service to store user credentials. Our backend system runs on express-js to connect to the database & to manage the authentication logic.
You can follow the tutorial to setup the MongoDB Atlas cluster here. The data structure for our user object is as follows:
User {
name: String,
uid: String,
}
Keep in mind that MongoDB Atlas will assign _id attribute by default.
Navigate to utils/database.js and change the credentials (username, password, dbName, collectionName) and the URI to appropriately connect to your newly setup MongoDB Atlas cluster.
Navigate to thte root of the project and run npm start to start the backend service locally. DEFAULT_PORT is set to 1880.
Here's the schematic of our Intrance SmartGate:
Once the board has been setup, navigate to ESP8266/SmartGate-servo and open SmartGate-servo.ino using Arduino IDE. You can run the script directly from the IDE.

