Skip to content

Conversation

@ThePixelExpert
Copy link

i recieved these errors after trying to read a rfid card :

Unhandled exception in thread started by <function check_rfid at 0x20008b90> Traceback (most recent call last): File "<stdin>", line 94, in check_rfid File "mfrc522.py", line 174, in request File "mfrc522.py", line 98, in _tocard File "mfrc522.py", line 59, in _rreg MemoryError: memory allocation failed, allocating 1869440365 bytes

i dont think i did anything wrong but here is my code that i use to check for the rfid :

`def check_rfid():
while True:
(stat, tag_type) = reader.request(reader.REQIDL)
if stat == reader.OK:

        (stat, uid) = reader.SelectTagSN()
    
        if stat == reader.OK:
            print("Card detected %s" % uidToString(uid))
        else:
            print("Authentication error")

_thread.start_new_thread(check_rfid, ())
here is my reader :reader = MFRC522(spi_id=0,sck=2,miso=4,mosi=3,cs=1,rst=0)`

almost positive i am not doing anything wrong but if i am can u let me know (and if im not u have bugs to fix lol)

im using a raspberry pi pico

Copy link

@uiolee uiolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many rewrite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants