I want to connect RFID with Raspberry Pi Through node-red. While it is working fine with python code.
What hardware are you using?
rfid-rc522 and raspberry pi 3 b+
rfidreader.py.txt (3.1 KB)
Try this library, the one I use has some pins changed, and make sure it matches the pins you use.
MFRC522.py.txt (10.1 KB)
Thanks for your again reply, I am using the following tutorial with your sent files. https://developer.ibm.com/recipes/tutorials/reading-rfid-mifare-cards-into-watson-iot-platform-using-your-raspberry-pi-3/
And connecting pins on exact same positions. But still got an error.
What if you remove the old library files and do
sudo pip3 install mfrc522? I don't think
python MFRC522.py installs the library.
Thanks for your kindness Miss. Tobia. I got the modified files from following link https://github.com/mxgxw/MFRC522-python/commit/52507f18514bd4259c3e34886587ac2f95b13cb4#diff-928e81e8826acacbcb72f6dcde038977
New update files are : MFRC522.py.txt (11.4 KB) rfidreader.py.txt (3.6 KB)
Great. Beware that the RPi will run at about 25% CPU with that rfidreader.py exec node. I'm sure it's possible to change the rfidreader.py file so that it runs differently, pausing a few seconds in between but I haven't tried to change it. Maybe someone else knows how to.
Hi, it is working fine but I need to attach LED with an RFID reader and for that, I am using function node to convert python to json as mentioned in the picture
And still, RFID working fine but shows an error of function node.
When you get an error like that the first thing to do is to also connect a debug node to show what is going into the function node in order to see what it is working on. Once you know that then consider what you think the function
JSON.parse() will do with whatever you are feeding it.
Is this the same student project as in the similar thread going on at the same time?