RFID programming giving error? I had it working the other day but something has happened and I have had a hard time to find documentation that works how to get the py zero w headless set up with rfid working is a problem? Thanks
Hey @Matthew126715, welcome back to the forums!
From the error message in the image you sent, it seems that the PiicoDev_RFID module is not present in the same directory as your “read_id.py” file.
Additionally, this may mean the PiicoDev_Unified module is not installed (just taking a guess, but is fairly likely).
The “Import” lines at the start of the file effectively tell your program to use all of the functions defined in the specified files. These are normally direct hardware interfacing functions to do standard operations with your device. If you don’t have these files in an accessible location, the program cannot find and import them.
You can download both of these files from our GitHub repository, I’ll send links for each below:
PiicoDev_RFID
PiicoDev_Unified
(Hint for future: These links can typically be found on the product page for any of our PiicoDev/Makerverse range of products as seen below!)
Just install both of these files on the “RP2040 Device” from Thonny alongside your “read_id.py” file and everything should work! (Ignore “Makerverse motor”, it’s from a previous project)
Hope this helps!
I need to to write on each of the tags from a mysql database.
Is there a script I can copy and edit to connect to the database that you can recommend?
When I shut down my py zero 2 w from the front end there is no way of starting it remotely?
I have to unplug it and plug it back in. Is there a way I can get it to start the front end again or start the front end with the terminal? Thanks
Hi Matthew,
I don’t have any experience with MySQL databases so I am not too sure what’s available there. As for remotely waking the Pi I know that there are some options available there.
Wake on LAN is what I see most commonly used. I haven’t used it myself just yet but there is quite a bit of info about. Here’s an Instructables article for example. Have a bit of a look to see if this will be right for you.
Thanks I actualy wanted to wake a Raspberry Pi from a halted state. After shutdown.
How do I send a signal from another device, can reset the Pi and cause it to boot up again?
One option is to wake a raspberry PI through the GPIO.
Would that work for you?
Im not sure what to do here am I supposed to download these 2 repository’s and put them in the same folder as the sketch? PiicoDev_RFID
PiicoDev_Unified
I dont think I had to do this before? It all seamed to work last time.
Why weren’t they installed in the manage packages like your video?
Hi Matthew,
Are you still getting the same errors as earlier?
There shouldn’t be anything too special needed to get this working. What OS are you using?
How do I find out? I installed it with raspberry imager?
py zero 2 w and the recomended i think 64 bit?
What is the procedure to install the correct files in the correct folder to get the rfid working?
Hi Matthew,
You are correct that it should be as simple as installing these packages within Thonny as seen in the video below.
If this is in reference to my original response, then I must apologise. I misread the device you were using as a “Pico W” instead of a “Zero W”. The process is different for microcontroller devices compared to an SBC.
This doesn’t explain why it has stopped working as intended, however. You can check your PiOS version as follows:
- Open the terminal on your Pi Zero 2 W
- Type the following command to return your OS version data:
cat /etc/os-release
The output of that command should tell you your OS version.
Let us know how you go!
cat /etc/os-release
PRETTY_NAME=“Debian GNU/Linux 12 (bookworm)”
NAME=“Debian GNU/Linux”
VERSION_ID=“12”
VERSION=“12 (bookworm)”
VERSION_CODENAME=bookworm
ID=debian
HOME_URL=“https://www.debian.org/”
SUPPORT_URL=“Debian -- User Support”
BUG_REPORT_URL=“https://bugs.debian.org/”
can you explain the procedure to upload the piicodev code to the py and what folders to use, so I know how to do it? Please
Hi @Matthew126715,
The process to install and use these modules can be seen in the PiicoDev RFID Module Guide by Michael.
During the “Bookkeeping” section of the video, you’ll see Michael take the following steps to install the PiicoDev dependencies:
-
Click the RPi icon in the top left of your desktop and navigate to Preferences > Raspberry Pi Configuration
-
In this new window, navigate to the “Interfaces” tab and make sure “I2C” is set to “Enabled”
-
Open your Thonny IDE from the programming menu, and navigate to Tools > Manage Packages
-
In this new window, enter “piicodev” in the search bar. There should only be one option. Click this and then hit the “Install” button. It should look something like this:
If your setup looks any different, send us an image of what you see on your end.
mine doesn’t have piicodev in the drop down to choose it?
Can you explain the way to down load it and upload it please so I can do it now today please?
It must have been the operating system I chose?
Hi Matthew,
Nothing appearing in the drop down relates to this issue with PyPi: Thonny Search of PyPi no longer working - #2 by Pixmusix
Follow the Pico instructions and save the files in the same directory you have the main.py script.
Here are those instructions: PiicoDev RFID Module - Guide for Raspberry Pi Pico - Tutorial Australia
Please let us know if you hit any snags with this process.
I have managed to copy the files to the pi. it didn’t want to copy and paste in one go?
I have tried to run the codes but still get errors? is it a problem with issue with PyPi: Thonny Search of PyPi no longer working - #2 by Pixmusix?
Is this product only for learning?
Im looking for a commercial product I can use in hotel door locks. I need a quality product?
Thanks
Hey @Matthew126715,
I can see these products as being applicable to something like hotel door locks. It seems like just setup complications at the moment and not any related to the product itself so hopefully once we get past this hurdle this will be a suitable option for you!
This error is a weird one. It looks like the code at line 161 inside of the PiicoDev_Unified.py file is incorrectly indented when compared to the rest of the code. I’m looking at this file as it is linked from the guide and that indentation seems correct.
You could always troubleshoot this by redownloading this particular file or by opening it to line 161 and checking that the indentation is correct.
Thanks, The Starter Project - Vending Machine code is giving me an error?
I need to code the rfid tag with sql data. can you give me some documentation on how to code the tag from sql database please?
Hi Matthew,
PiicoDev is oriented towards Makers and Educators, for commercial products I would use a custom-designed board. While a quality product (to be fair I’m a bit biased :D)
Hotel door locks need to work seamlessly for years with minimal maintenance, and they must withstand repeated use, temperature fluctuations, humidity, and even possible vandalism. Our testing probably wont cover all of the bases that you need your locks to cover.
And commercial access control solutions need to meet high-security standards to protect guests and property. This involves robust encryption, secure communication protocols, tamper-resistance, and compliance with industry-specific security standards. Hobby-grade RFID readers typically don’t implement advanced security features and may leave your system vulnerable to spoofing or cloning attacks.
If you’re keen on going the commercial route I would get in touch with an engineering consultancy group, here in Newcastle we have Saphi: https://saphi.engineering/
I would have a look around your local area and see who can help out!
(But be warned, a consult can be quite expensive)
Liam