Created
April 1, 2019 03:45
-
-
Save dhavalsavalia/c802a35c486010fb9e9f5a56b46bae70 to your computer and use it in GitHub Desktop.
Simple init fingerprint R305 fingerprint reader using pyfingerprint library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyfingerprint.pyfingerprint import PyFingerprint | |
## Init fingerprint reader | |
try: | |
f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) | |
if ( f.verifyPassword() == False ): | |
raise ValueError('The given fingerprint sensor password is wrong!') | |
except Exception as e: | |
print('The fingerprint sensor could not be initialized!') | |
print('Exception message: ' + str(e)) | |
exit(1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment