Fingerprint Doorlock

Hi..I am doing some project here about fingerprint door lock using Arduino..I just can't understand why my codes didn't work out..

Maybe if you post your code we can help you :slight_smile:

1 Like

#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

finger.begin(9600);

if (finger.verifyPassword()) {
lcd.setCursor(0, 0);
lcd.print(" FingerPrint ");
lcd.setCursor(0, 1);
lcd.print("Sensor Connected");
}

else {
lcd.setCursor(0, 0);
lcd.print("Unable to found");
lcd.setCursor(0, 1);
lcd.print("Sensor");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Check Connections");

while (1) {
delay(1);
}
}

uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK) {
lcd.setCursor(0, 0);
lcd.print(" Waiting For");
lcd.setCursor(0, 1);
lcd.print(" Valid Finger");
return -1;
}

p = finger.image2Tz();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Messy Image");
lcd.setCursor(0, 1);
lcd.print(" Try Again");
delay(3000);
lcd.clear();
return -1;
}
p = finger.fingerFastSearch();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Not Valid Finger");
delay(3000);
lcd.clear();
return -1;
}

This is the code that I've made..
My project is Creating a fingerprint-based door lock Security System.

Arduino Uno
fingerprint sensor R307 Atmega328p
solenoid door lock 12v
relay module 5v
i2c LCD display 16x2

#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

finger.begin(9600);

if (finger.verifyPassword()) {
lcd.setCursor(0, 0);
lcd.print(" FingerPrint ");
lcd.setCursor(0, 1);
lcd.print("Sensor Connected");
}

else {
lcd.setCursor(0, 0);
lcd.print("Unable to found");
lcd.setCursor(0, 1);
lcd.print("Sensor");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Check Connections");

while (1) {
delay(1);
}
}

uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK) {
lcd.setCursor(0, 0);
lcd.print(" Waiting For");
lcd.setCursor(0, 1);
lcd.print(" Valid Finger");
return -1;
}

p = finger.image2Tz();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Messy Image");
lcd.setCursor(0, 1);
lcd.print(" Try Again");
delay(3000);
lcd.clear();
return -1;
}
p = finger.fingerFastSearch();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Not Valid Finger");
delay(3000);
lcd.clear();
return -1;
}

Hello
It seems to be a copy/paste error.
Setup() and loop() are missing.
Post your current sketch, well formated, with comments and in so called code tags "</>" to see how we can help.
Have a nice day and enjoy coding in C++.

I really don't have an idea about coding. I just copy it to youtube.

Hello
Run some tutorials for the hardware selected.
If you are happy with the results of the tutorials you can merge this to your project.
Have a nice day and enjoy coding in C++.

I ready don't have any idea about coding..hope you can help me. thank you

So you are looking for someone that code for you

Yes please

Sorry, but I don't think that you will find anyone who will code this for you for free.
The community will probably help you, if you get stuck with your problem. But you need to show that you realy trying to code it yourself.

Why do you need mega power such as portenta for this project?

Because this will help me pass my grades..i am a graduating student. My passing grades depends here

#include <Adafruit_Fingerprint.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include <SoftwareSerial.h>

void setup() {
// put your setup code here, to run once:
SoftwareSerial mySerial(2, 3);

finger.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
if (finger.verifyPassword()) {
lcd.setCursor(0, 0);
lcd.print(" FingerPrint ");
lcd.setCursor(0, 1);
lcd.print("Sensor Connected");
}

else {
lcd.setCursor(0, 0);
lcd.print("Unable to found");
lcd.setCursor(0, 1);
lcd.print("Sensor");
delay(3000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Check Connections");

while (1) {
delay(1);
}
}

uint8_t p = finger.getImage();

if (p != FINGERPRINT_OK) {
lcd.setCursor(0, 0);
lcd.print(" Waiting For");
lcd.setCursor(0, 1);
lcd.print(" Valid Finger");
return -1;
}

p = finger.image2Tz();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" Messy Image");
lcd.setCursor(0, 1);
lcd.print(" Try Again");
delay(3000);
lcd.clear();
return -1;
}
p = finger.fingerFastSearch();

if (p != FINGERPRINT_OK) {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Not Valid Finger");
delay(3000);
lcd.clear();
return -1;
}
}
try this

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.