I am a realative RPi noob so forgive me if this is a simple problem.
I am making a keycard system with the RC522 reader, and I have everything wired up correctly. It works with writing and reading cards. But for some reason when I try to compare the data, it always returns false
EX: Card is written with text "Keycard"
from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() while True: try: id, text = reader.read() except: pass print(text) if text == "Keycard": print("opening") else: print("Unauthorized card")
Now, it outputs
Keycard Unauthorized card
Why does it not recognize text = keycard?