Dump RFID Tag data using mxgxw/MFRC522-python
pi@raspberrypi ~ $ mkdir mxgxw
pi@raspberrypi ~ $ cd mxgxw
pi@raspberrypi ~/ mxgxw $ git clone https://github.com/mxgxw/MFRC522-python
pi@raspberrypi ~/ mxgxw $ cd MFRC522-python
pi@raspberrypi ~/ mxgxw/MFRC522-python $ sudo python Read.py <-- then read rfrc522
pi@raspberrypi ~/ mxgxw/MFRC522-python $ sudo python Dump.py <-- read & dump
Pins
You can use
this image for reference.
Name | Pin # | Pin name |
SDA | 24 | GPIO8 |
SCK | 23 | GPIO11 |
MOSI | 19 | GPIO10 |
MISO | 21 | GPIO9 |
IRQ | None | None |
GND | Any | Any Ground |
RST | 22 | GPIO25 |
3.3V | 1 | 3V3 |
Enable SPI using Raspberry Pi Configuration
pi@raspberrypi ~ $ ls /dev/spidev0.*
ls:cannot access bla~
pi@raspberrypi ~ $ ls /etc/modprobe.d/raspi-blacklist.conf
Install python-dev and SPI-Py
pi@raspberrypi ~ $ sudo apt-get install python-dev
pi@raspberrypi ~ $ git clone https://github.com/lthiery/SPI-Py
pi@raspberrypi ~ $ cd SPI-Py
pi@raspberrypi ~ /SPI-Py $ sudo python setup.py install
download MFRC522-python
pi@raspberrypi ~ $
git clone https://github.com/rasplay/MFRC522-python.git
pi@raspberrypi ~ $ cd
MFRC522-python
pi@raspberrypi ~ /
MFRC522-python $
Enable device tree
pi@raspberrypi ~ $ ls /boot/config.txt
pi@raspberrypi ~ $ sudo nano /boot/config.txt
device_tree=on <--append
Install latest version of bcm2835
The version of the package that this documentation refers to can be downloaded from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.50.tar.gz
--http://www.airspayce.com/mikem/bcm2835/
pi@raspberrypi ~ $ mv ~/Downloads/bcm2835-1.50.tar.gz ~
pi@raspberrypi ~ $ tar zxvf bcm2835-1.50.tar.gz
pi@raspberrypi ~ $ cd bcm2835-1.50
pi@raspberrypi ~ bcm2835-1.50 $
pi@raspberrypi ~ bcm2835-1.50 $ ./configure
pi@raspberrypi ~ bcm2835-1.50 $ make
pi@raspberrypi ~ bcm2835-1.50 $ sudo make check
pi@raspberrypi ~ bcm2835-1.50 $ sudo make install
pi@raspberrypi ~ bcm2835-1.50 $ sudo reboot
read RFID tags using RFID Reader, RFID-RC522.
pi@raspberrypi ~ $ cd
MFRC522-python
pi@raspberrypi ~ /
MFRC522-python $ sudo python read.py
Dump RFID Tag data one-by-one
pi@raspberrypi ~ $ cd /mxgxw/
MFRC522-python
pi@raspberrypi ~ /mxgxw/
MFRC522-python $ sudo python pyDump1.py
출처 https://www.youtube.com/channel/UCUC46OBgd9H1gmQIpNp4_uw