Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to setup a Raspberry Pi RFID RC522 Chip
- https://pimylifeup.com/raspberry-pi-rfid-rc522/
- sudo raspi-config
- sudo reboot
- lsmod | grep spi
- sudo nano /boot/config.txt
- Within the configuration file, use CTRL + W to find “dtparam=spi=on“
- Once you have made the changes, you can press CTRL + X then pressing Y and then Enter to save the changes.
- RFID
- sudo apt update
- sudo apt upgrade
- sudo apt install python3-dev python3-pip
- sudo pip3 install spidev
- sudo pip3 install mfrc522
- Writing with the RFID RC522
- mkdir ~/pi-rfid
- cd ~/pi-rfid
- sudo nano Write.py
- #!/usr/bin/env python
- import RPi.GPIO as GPIO
- from mfrc522 import SimpleMFRC522
- reader = SimpleMFRC522()
- try:
- text = input('New data:')
- print("Now place your tag to write")
- reader.write(text)
- print("Written")
- finally:
- GPIO.cleanup()
- ***********************
- #!/usr/bin/env python
- import RPi.GPIO as GPIO
- from mfrc522 import SimpleMFRC522
- reader = SimpleMFRC522()
- try:
- text = input('New data:')
- print("Now place your tag to write")
- reader.write(text)
- print("Written")
- finally:
- GPIO.cleanup()
- *****************
Advertisement
Add Comment
Please, Sign In to add comment