TREx/rfid_test.py
2023-01-12 14:19:36 +00:00

12 lines
206 B
Python

from time import sleep
import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
while True:
id, text = reader.read()
print(id)
print(text)
sleep(1)
GPIO.cleanup()