From 8e444dac244e97c2b29c5de28f90f2217248c4af Mon Sep 17 00:00:00 2001 From: Aaditya Awati <107744138+AadityaAwati@users.noreply.github.com> Date: Sat, 1 Mar 2025 22:13:07 +0530 Subject: [PATCH] Created main.py which will be the script that uses the library to identify the user. More Unerstandable and Proper. --- main.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..31514d6 --- /dev/null +++ b/main.py @@ -0,0 +1,27 @@ +from fingerprint_scanner import FingerPrint + +print("\n\n\n!!! IN-ORDER FOR THE PROGRAM TO FUNCTION, THIS PROGRAM MUST ME EXECUTED IN A CMD PROMPT RUN AS AN ADMIN !!!\n\n\n") +print("\t\t\t\t\t\t\t\t\tFINGER-PRINT SENSOR READ PROGRAM\n\n") + +my_fingerprint = FingerPrint() +my_fingerprint.print_data = True + +if my_fingerprint.print_data: + print("The program has been set to print_data = 'True' Mode. To change this, change the variable's value in the main.py program to 'False' Mode.\n") + +try: + print("Place your finger on the sensor ...") + my_fingerprint.open() + + print("Starting Identification Process ...\n") + my_fingerprint.identify() + + print("Success! Finger-Print has been stored temporarily.") + print("Please Place A Finger On the Sensor, to check whether it is the same one or not ...\n") + + if my_fingerprint.verify(): + print("Welcome! Authorized User.") + else: + print("Sorry! You have not been authorized.") +finally: + my_fingerprint.close()