Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2013 18:44
What would you like to do?
Python script that looks at Wiegand card reader and sends new reads to a 4D Systems LCD screen
from time import sleep
from fourdsystems import clear_lcd, put_string
lastCard=" "
with open('/sys/kernel/wiegand/read', 'r') as f:
card =':')
if lastCard != card[0]:
lastCard = card[0]
print card
put_string('Read #{0}, facility: {1}, card: {2}\n'.format(card[0], card[1], card[2]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment