stafett/reader.py

12 lines
207 B
Python
Raw Normal View History

2022-03-16 11:58:53 +00:00
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
try:
while True:
id, text = reader.read()
print(id)
print(text)
except KeyboardInterrupt:
GPIO.cleanup()
raise