Good day folks, it have really been awhile so in this post we will work on a Fingerprint Attendance system with Raspberry Pi with GUI. I must confess the Android version is much more simpler. So lets not waste much time with pleasantries and get to work.
- Blink LED using Flutter mobile app, NodeMCU
- How to connect and use LDR (Light Dependent Resistor) with Raspberry Pi
- How to make your own RF Home Automated System
I must warn you that the GUI is not fancy at all, your own version might be. Some of the components are listed below:
- Fingerprint print module
- Raspberry Pi 3
- USB TTL 5v-3.3v (optional)
I was lucky to get a 3.3volts Fingerprint module so I can drop the USB TTL Module but I still used it to be on the safe side. The diagram below will help you with the connection.
To setup your Raspberry Pi, you can refer to this posts:
- No Keyboard, Ethernet & Monitor: Setting up Raspberry Pi in headless Mode
- Remote Desktop Access setup with xrdp on Raspberry Pi raspbian stretch
We will need to grab these python libraries:
Installing Guizero is quite easy using pip3:
sudo pip3 install guizero
To install Pyfingerprint, follow these steps:
- run these commands:
wget -O - http://apt.pm-codeworks.de/pm-codeworks.de.gpg | apt-key add -
wget http://apt.pm-codeworks.de/pm-codeworks.list -P /etc/apt/sources.list.d/
- We then update the available packages and install the Python library:
apt-get update apt-get install python-fingerprint --yes
- If an error has occurred (in particular, that not all dependent packages have been installed), then execute the following:
apt-get -f install
The library came with some examples which you can use for some of your fun but lets outline the functionality of our system:
- Sign in
- Sign out
- Save and retrieve Admin password from a file
- Required Admin password to enroll or delete
Create all windows:
This code snippet creates all the windows that we will be needing. This is not a tutorial on GUI but I will throw in alittle explanation.
App is the main window or widget, more than one window can be opened at once but we only need one window open at once so when we navigate out of a window , we do well to close it and when we create a new window, we also do well to hide.
I made little modifications to the enroll example that came with the library. The enroll example generates the ID automatically but I replaced that with the ID provided by the user through the textfield (check line 54).
This code snippet clears the Fingerprint sensor database after the user have provided authentication:
Sign in and out:
Save and retrieve Admin password from a file
Feel free to add your comments about these post and don’t forget to follow our tutorials through our social media channels.