Hey,
In today's blog we are going to make a fingerprint based car ignition system.
WHAT YOU NEED :
Arduino nano
R305 fingerprint sensor
EM18 RFID reader
16×2 LCD display
DC motor
L293D motor driver
Breadboard
Connecting wire
12v battery
CODE :
#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal.h>
char
input[12];
int
count = 0;
int
a = 0;
const
int
rs = 6, en = 7, d4 = 2, d5 = 3, d6 = 4, d7 = 5;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
SoftwareSerial mySerial(12,11);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
void
setup()
{
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
digitalWrite(9,LOW);
digitalWrite(10,LOW);
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.print(
" WELCOME TO "
);
lcd.setCursor(0, 1);
lcd.print(
" CIRCUIT DIGEST "
);
delay(2000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(
"Please swipe "
);
lcd.setCursor(0, 1);
lcd.print(
"Your License "
);
}
void
loop()
{
if
(Serial.available())
{
count = 0;
while
(Serial.available() && count < 12)
{
input[count] = Serial.read();
count++;
delay(5);
}
if
(count == 12)
{
if
((
strncmp
(input,
"3F009590566C"
, 12) == 0) && (a == 0))
{
lcd.setCursor(0, 0);
lcd.print(
"License Valid "
);
lcd.setCursor(0, 1);
lcd.print(
"Welcome "
);
delay(1000);
a = 1;
fingerprint();
}
else
if
((
strncmp
(input,
"0B0028883E95"
, 12) == 0) && (a == 0))
{
lcd.setCursor(0, 0);
lcd.print(
"License Valid "
);
lcd.setCursor(0, 1);
lcd.print(
"Welcome "
);
delay(1000);
a = 1;
fingerprint();
}
else
{
if
(a != 1)
{
lcd.setCursor(0, 0);
lcd.print(
"License Invalid "
);
lcd.setCursor(0, 1);
lcd.print(
"Try Again!!! "
);
delay(2000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(
"Please swipe "
);
lcd.setCursor(0, 1);
lcd.print(
"Your License "
);
}
}
}
}
}
Making electronics project is too pretty simple with Us.
Join and Make with Us.
Comments