How To Delete Unwanted Fingerprint ID's Stored In Fingerprinrt Sensor R307 Using Arduino By Technoesolution | #arduinotutorial

January 30, 2022


Description

Hello, In the previous article we see "How To Detect finger ID's stored in Sensor" & In this tutorial, I will see "how to Delete unwanted fingerprint ID stored in fingerprint sensor by using Arduino Uno".We need an Adafruit fingerprint Sensor Library, I have already explained how to install this library in Arduino IDE. If you want to see the tutorial video you can visit my youtube channel for more interesting projects & tutorials.

Watch out the video If reading bores you.

If you got this article helpful then subscribe to our blog as well as our youtube channel for more interesting projects.

Material Required:-

[The following link is Affiliated links. If you buy from them we will get some bonus from it.]

Sr.No

Product Name

Quantity

Best Buy Link

1

Arduino Uno

1

https://amzn.to/3nCSn4j

2

R307 Fingerprint Sensor

1

https://amzn.to/33DqFgR

3

Breadboard + Jumper Wires

1

https://amzn.to/3fIWUO5

Adafruit Fingerprint Sensor Library:- [Download]

Circuit Diagram:-

Refer above circuit diagram to make proper connections.

Arduino Code:-(Download)

/*
   Hello guys welcome back to "Techno-E-Solution"
   Tutorial Name:- How To Delete Unwanted Fingerprint ID's Stored In Fingerprinrt Sensor R307 Using Arduino
   Tutorial Video:- https://youtu.be/N7GKaq_0Udw
*/

#include <Adafruit_Fingerprint.h>
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);
void setup()  
{
  Serial.begin(9600);
  while (!Serial);  // For Yun/Leo/Micro/Zero/...
  delay(100);
  Serial.println("\n\nDelete Finger");
  // set the data rate for the sensor serial port
  finger.begin(57600);
  
  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1);
  }
}
uint8_t readnumber(void) {
  uint8_t num = 0;
  
  while (num == 0) {
    while (! Serial.available());
    num = Serial.parseInt();
  }
  return num;
}
void loop()                     // run over and over again
{
  Serial.println("Please type in the ID # (from 1 to 127) you want to delete...");
  uint8_t id = readnumber();
  if (id == 0) {// ID #0 not allowed, try again!
     return;
  }
  Serial.print("Deleting ID #");
  Serial.println(id);
  
  deleteFingerprint(id);
}
uint8_t deleteFingerprint(uint8_t id) {
  uint8_t p = -1;
  
  p = finger.deleteModel(id);
  if (p == FINGERPRINT_OK) {
    Serial.println("Deleted!");
  } else if (p == FINGERPRINT_PACKETRECIEVEERR) {
    Serial.println("Communication error");
    return p;
  } else if (p == FINGERPRINT_BADLOCATION) {
    Serial.println("Could not delete in that location");
    return p;
  } else if (p == FINGERPRINT_FLASHERR) {
    Serial.println("Error writing to flash");
    return p;
  } else {
    Serial.print("Unknown error: 0x"); Serial.println(p, HEX);
    return p;
  }   
}

You can Buy me coffee If you got this article helpful.