Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4466

Python • Raspberry Pi 5 with RC522 |

$
0
0
Hello dear Raspberry Pi Community, I am a total beginner and have connected my Raspberry Pi 5 today for the first time.
I got it for the school project, where I have to write a 15-page research paper (sort of), my topic is "Basics and application of RFID technology using the example of a self-made escape room puzzle". I live in Germany if that helps somehow idk.

I soldered the pins thingies to the RC522 RFID module and connected it to the RPI 5 using the jumper wires and a breadboard. Then I used following video https://www.youtube.com/watch?v=evRuZRx ... PiMyLifeUp to try and get the thing to work, but I encountered several problems.

The first one I encountered was when trying to install libraries:

Code:

lime@raspi:~ $ pip3 install spidev mfrc522error: externally-managed-environment× This environment is externally managed╰─> To install Python packages system-wide, try apt install    python3-xyz, where xyz is the package you are trying to    install.        If you wish to install a non-Debian-packaged Python package,    create a virtual environment using python3 -m venv path/to/venv.    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make    sure you have python3-full installed.        For more information visit http://rptl.io/venvnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.hint: See PEP 668 for the detailed specification.
I am a total noob in using the console as input terminal (I always used python IDEs) and have almost no idea about libraries etc.. So I started researching, the problem could be solved using either

Code:

--break-system-packages
after the

Code:

install
command thingy OR I could do it via virtual environment, which I used, it was even kinda satisfying.

Alright, the first problem solved (I think), the next one I encountered is when trying to run code:

Code:

Traceback (most recent call last):  File "<string>", line 4, in <module>  File "/home/lime/rfid_env/lib/python3.11/site-packages/mfrc522/SimpleMFRC522.py", line 14, in __init__    self.READER = MFRC522()  File "/home/lime/rfid_env/lib/python3.11/site-packages/mfrc522/MFRC522.py", line 151, in __init__    GPIO.setup(pin_rst, GPIO.OUT)RuntimeError: Cannot determine SOC peripheral base address
I researched and researched, found out the libraries used in the code don't work with the Pi5, devastation, I am completely stumped and have no idea what I should do. I even tried using ChatGPT but to no success, it told me to downgrade to Pi4, but that's not an option for me.
So here I am, trying to find a solution here, found a post (viewtopic.php?p=2273320&hilit=RC522#p2273320) with the same problem, couldn't fix mine, because of another problem which I don't even know how it happened. I don't 100% know what happened, but MFRC522 wasn't found although I installed it.

Absolutely no idea what to do, might reinstall OS completely tomorrow to start from a blank page and try find a solution again. Really hope for somebody to reply and help with my problems, because I am completely exhausted

Statistics: Posted by 00Lime — Sat Jan 11, 2025 8:03 pm — Replies 0 — Views 22



Viewing all articles
Browse latest Browse all 4466

Trending Articles