Skip to content

Instantly share code, notes, and snippets.

@dhavalsavalia
Created April 1, 2019 03:45
Show Gist options
  • Save dhavalsavalia/c802a35c486010fb9e9f5a56b46bae70 to your computer and use it in GitHub Desktop.
Save dhavalsavalia/c802a35c486010fb9e9f5a56b46bae70 to your computer and use it in GitHub Desktop.
Simple init fingerprint R305 fingerprint reader using pyfingerprint library
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