Indian Army security Gate | inspire Award Project | best science Project | Harish Projects 2023
- Get link
- X
- Other Apps
Click Here to watch full video
//Arduino Code//
#include <Servo.h>
#include <SPI.h>
#include <RFID.h>
RFID rfid(10, 9);
byte kart[5] = {128,207,122,175,154};
Servo myservo;
boolean card;
void setup()
{
Serial.begin(9600);
SPI.begin();
rfid.init();
myservo.attach(3);
myservo.write(100);
}
void loop()
{
if (rfid.isCard())
{
if (rfid.readCardSerial())
{
Serial.print("Found ID: ");
Serial.print(rfid.serNum[0]);
Serial.print(",");
Serial.print(rfid.serNum[1]);
Serial.print(",");
Serial.print(rfid.serNum[2]);
Serial.print(",");
Serial.print(rfid.serNum[3]);
Serial.print(",");
Serial.println(rfid.serNum[4]);
}
for (int i = 1; i < 5; i++)
{
if (rfid.serNum[0] == kart[0] && rfid.serNum[1] == kart[1] && rfid.serNum[2] == kart[2] && rfid.serNum[3] == kart[3] && rfid.serNum[4] == kart[4])
{
card = true;
}
else {
card = false;
}
}
if (card == true)
{
Serial.println("Correct Card");
myservo.write(10);
delay(5000);
myservo.write(100);
}
else
{
Serial.println("Wrong Card");
}
rfid.halt();
}
}
//Project Diagram//
If you want to order project kit then contact me on instagram
Click here - https://www.instagram.com/harishchoudhary70/
- Get link
- X
- Other Apps
Comments
please write the full program code i'm stuck in RFID
So please don't do this project π
And Harry's sir I am not trying to stop your this code sir in the code
Not found the file showing so please π sir can you DM me and help me because i have project for school in 3 day I trying this code form 15 weeks please sir π