Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having problems running Sudo Python read.py #19

Open
Grahamrich1 opened this issue Jun 23, 2017 · 0 comments
Open

Having problems running Sudo Python read.py #19

Grahamrich1 opened this issue Jun 23, 2017 · 0 comments

Comments

@Grahamrich1
Copy link

I have been getting an error "can't open device: No such file or directory" which I have nailed down to the line

pi@raspberrypi:~/gr_programs/RFID/SPI-Py/MFRC522-python $ sudo python read.py
Opening file.
importing MFRC533.
Opening signal
Signal open
MIFAREREADER =
can't open device: No such file or directory

This is my modified .py

print "Opening file."
print "importing MFRC533."
import MFRC522
print "Opening signal"
import signal
print "Signal open"
continue_reading = True
print "MIFAREREADER ="
MIFAREReader = MFRC522.MFRC522()

print "Def card AtoC ="
cardA = [5,74,28,185,234]
cardB = [83,164,247,164,164]
cardC = [20,38,121,207,132]

print "Def end read ="
def end_read(signal, frame):
global continue_reading
continue_reading = False
print "Ctrl+C captured, ending read."
MIFAREReader.GPIO_CLEEN()

signal.signal(signal.SIGINT, end_read)

Any idea on what I doing wrong?

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

No branches or pull requests

1 participant