Open huhm23 opened 1 year ago
import RPi.GPIO as GPIO import sys import time from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
print("Hold a tag near the reader") print("Reading tag in 1 second...") time.sleep(1) id = reader.read_id_no_block()
if id: print(hex(id)) else: print("No tag detected")
if hex(id) == "0xb883bd33b5": print("Hello Haelyne") elif hex(id) == "0x944f08aa79": print("Hello Dean") elif hex(id) == "0x64ff0daa3c": print("Hello Dana") elif hex(id) == "0xb4b32baa86": print("Hello Professor Fund") elif hex(id) == "0x34e619aa61": print("Hello Ufuk") else: print("Nothing was scanned. Please try again.")
GPIO.cleanup()
cd AL-Aisle-Locator-/RFID git clone https://github.com/pimylifeup/MFRC522-python cd MFRC522-python sudo python3 setup.py install cd AL-Aisle-Locator-/RFID