MFRC522-python icon indicating copy to clipboard operation
MFRC522-python copied to clipboard

Problems by Starting the program

Open luismauriz1 opened this issue 7 years ago • 6 comments

Hello, i have a small problem with my MFRC522. All the pins are connected correctly. but now, when i want to start the programm the pi shows me python Read.py Traceback (most recent call last): File "Read.py", line 41, in <module> MIFAREReader = MFRC522.MFRC522() File "/home/pi/Desktop/MFRC522-python/MFRC522.py", line 133, in __init__ GPIO.setup(NRSTPD, GPIO.OUT) NameError: global name 'NRSTPD' is not defined

I hope that you can help me. Thanks a lot for your help!

luismauriz1 avatar Mar 24 '18 22:03 luismauriz1

I'm having the same issue, I've been searching for hours with little luck all I know if from reading the error, if you go into that file and type nano MFRC522.py and go to the 133rd line it says GPIO.setup(NRSTPD, GPIO.OUT) thats all I've learned I'll keep searching and if I find a solution I'll share it with you :)

ItZNoss avatar Mar 25 '18 06:03 ItZNoss

Are you guys using latest from this lib - or some kind of fork?

Jbithell avatar Mar 25 '18 11:03 Jbithell

Part of me wonders if its related to this - could you try changing this line back? https://github.com/mxgxw/MFRC522-python/pull/51/commits/68963702c1cc9718c0fc3a6c666cd3e1d65adaa5 (ie change NRSTPD to 22)

Jbithell avatar Mar 25 '18 11:03 Jbithell

i use the latest version from this lib. i will try the changing of values now. Thanks!

luismauriz1 avatar Mar 25 '18 11:03 luismauriz1

I changed line 133 NRSTPD to 22. Now, its working perfektly. TY

luismauriz1 avatar Mar 25 '18 12:03 luismauriz1

Hi All! Please check if it's working now. In a previous merge there was a reference to the global NRSTPD (reset line) that is actually defined inside the class. It should be working now. Please confirm if it's working right for you to close this issue.

mxgxw avatar Mar 26 '18 00:03 mxgxw