sudo apt-get update sudo apt-get upgrade
sudo raspi-config (SPI activation) sudo reboot
sudo apt-get install python3-spidev python3-rpi.gpio
mkdir ~/rfid_project cd ~/rfid_project
git clone http://github.com/pimylifeup/MFRC522-python.git cd MFRC522-python
python3 setup.py install
cd ~/rfid_project nano rfid_test.py#the following lines of code are part of the py file to execute
import RPi.GPIO as GPIO from mfrc522 import SimpleMFRC522 reader = SimpleMFRC522() try: print("Avvicina la tua carta al lettore RFID...") id, text = reader.read() print(f"ID: {id}\nTesto: {text}") finally: GPIO.cleanup()#last command to execute the py file
python3 rfid_test.py
py data = { "sample": "some sample message" } with open("./file.json", "w") as outfile: json.dump(data, outfile)for some reason this just does not work, ignore that some stuff is weirdly out of place, it's not like that in the file, it just happened because i copied it over
root@joshua:/mnt/sata/docker/symphonyyoga# sudo docker-compose logs wordpress wordpress-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message wordpress-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.2. Set the 'ServerName' directive globally to suppress this message wordpress-1 | [Wed Aug 21 21:08:42.481666 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.61 (Debian) PHP/8.2.22 configured -- resuming normal operations wordpress-1 | [Wed Aug 21 21:08:42.481790 2024] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND' wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:09:53 +0000] "GET / HTTP/1.1" 500 2719 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:09:58 +0000] "GET /favicon.ico HTTP/1.1" 500 2719 "http://192.168.50.91:8080/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:10:13 +0000] "GET / HTTP/1.1" 500 2719 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:10:21 +0000] "GET /wp-admin/install.php HTTP/1.1" 403 497 "http://192.168.50.91:8080/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:10:31 +0000] "GET / HTTP/1.1" 500 2719 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:16:26 +0000] "GET / HTTP/1.1" 301 423 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:38:41 +0000] "GET / HTTP/1.1" 301 423 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:38:49 +0000] "GET /wp-admin/install.php HTTP/1.1" 403 497 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:39:05 +0000] "GET /wp-admin HTTP/1.1" 301 596 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:39:05 +0000] "GET /wp-admin/ HTTP/1.1" 302 465 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | 192.168.50.113 - - [21/Aug/2024:21:41:13 +0000] "GET / HTTP/1.1" 301 423 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" wordpress-1 | [Wed Aug 21 21:55:58.358004 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00170: caught SIGWINCH, shutting down gracefully wordpress-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.3. Set the 'ServerName' directive globally to suppress this message wordpress-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.3. Set the 'ServerName' directive globally to suppress this message wordpress-1 | [Wed Aug 21 22:14:29.996782 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.61 (Debian) PHP/8.2.22 configured -- resuming normal operations wordpress-1 | [Wed Aug 21 22:14:29.996935 2024] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND' wordpress-1 | [Wed Aug 21 22:41:32.617161 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00169: caught SIGTERM, shutting down wordpress-1 | [Wed Aug 21 22:41:33.290713 2024] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.61 (Debian) PHP/8.2.22 configured -- resuming normal operations wordpress-1 | [Wed Aug 21 22:41:33.290848 2024] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'