stafett/reader.py

12 lines
207 B
Python

from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
while True:
id, text = reader.read()
print(id)
print(text)
except KeyboardInterrupt:
GPIO.cleanup()
raise