2016년 11월 9일 수요일

MFRC522-python

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.
NamePin #Pin name
SDA24GPIO8
SCK23GPIO11
MOSI19GPIO10
MISO21GPIO9
IRQNoneNone
GNDAnyAny Ground
RST22GPIO25
3.3V13V3

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

댓글 1개:

vsftpd FTP 서버 접속은 성공하였으나, "디렉토리 목록 조회 실패" 현상 발생시

FTP Passive 모드를 활성화 필요. 1. vsftpd 설정 변경 /etc/vsftpd/vsftpd.conf 상에 아래 내용 추가 기입 #passive modpasv_enable=YES pasv_min_port=5001 pasv...