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

MFRC522-python not working after running mfrc522-rpi #12

Open
tashmo opened this issue Nov 10, 2019 · 1 comment
Open

MFRC522-python not working after running mfrc522-rpi #12

tashmo opened this issue Nov 10, 2019 · 1 comment

Comments

@tashmo
Copy link

tashmo commented Nov 10, 2019

Hello,
I have just installed mfrc522-rpi on my raspberry pi 3, and it I ran the read test example successfully. However, after exiting the app (Ctrl+c), I noticed that my other python program which uses MFRC522-python library, now is not detecting that rfid tag unless I reboot and run it before the mfrc522-rpi example.

in other words, if I run the python example first it works. On exit I call GPIO.cleanup(), so when I run node node /node_modules/mfrc522-rpi/test/read.js it works fine, but if I run python3 mypythonapp.py after it it doesn't detect the tag and output is:
/usr/local/lib/python3.7/dist-packages/mfrc522/MFRC522.py:151: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(pin_rst, GPIO.OUT)

I think this has to do with gpio cleanup?
P.S I tried to call rpio.close(22); and this.spi.close() in /node_modules/mfrc522-rpi/index.js, the warning above is gone, but still can't detect the tag.
Can anyone help with this please?

Ta

Hardware: raspberry pi 3 running raspbian buster
Node v12.8.0 (using nvm)

@FelixSchuermann
Copy link

could you fix the problem?

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

2 participants