MFRC522-python
MFRC522-python copied to clipboard
some problem about the nSPI function
Hi~ Thanks for this useful module. I can run the read.py file successfully
pi@raspberrypi ~/Documents/rfid_demo $ sudo python read.py
Welcome to the MFRC522 data read example
Press Ctrl-C to stop.
but when I move the file to another directory error occured the command line output is:
pi@raspberrypi ~/Document/mahjong/test_code $ sudo python read.py
Traceback (most recent call last):
File "read.py", line 21, in <module>
MIFAREReader = MFRC522.MFRC522()
File "/home/pi/Documents/mahjong/test_code/MFRC522.py", line 111, in __init__
nSPI(device=dev,speed=spd)
NameError: global name 'nSPI' is not defined
so I wonder what is the function nSPI()? the code is absolutely the same. I am new to python. Thank you for your help!