Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
projects:rfid [2016/05/27 18:48]
over23 reformating
projects:rfid [2016/06/14 03:52]
over23 [Python to control GPI]
Line 3: Line 3:
 |**Interested:​** | | |**Interested:​** | |
 |**Related:​**| [[project:​dvere|[Project Dvere]]]| |**Related:​**| [[project:​dvere|[Project Dvere]]]|
-|**References:​**|[[https://​thepihut.com/​blogs/​raspberry-pi-tutorials/​27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins|[Dioda pro lamy - ENG]]] -- [[http://​raspberrypi.stackexchange.com/​revisions/​31743/​3|[GPIO explanations]]] |+|**References:​**|[[https://​thepihut.com/​blogs/​raspberry-pi-tutorials/​27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins|[Dioda pro lamy - ENG]]] -- [[http://​raspberrypi.stackexchange.com/​revisions/​31743/​3|[GPIO explanations]]] -- [[http://​wiki.lemaker.org/​BananaPro/​Pi:​Pin_definition|[BananaPi GPIO manual]]] |
 |**Materials:​**| BananaPi, RFID-RC522, nepajive pole, kabely samec-samice s jumper konci, 5V napajeni, pajecka, pocitac s SSH| |**Materials:​**| BananaPi, RFID-RC522, nepajive pole, kabely samec-samice s jumper konci, 5V napajeni, pajecka, pocitac s SSH|
 |**License:​** | [[https://​creativecommons.org/​licenses/​by-sa/​3.0/​|Uveďte původ-Zachovejte licenci; CC BY-SA]] ​ |  ​ |**License:​** | [[https://​creativecommons.org/​licenses/​by-sa/​3.0/​|Uveďte původ-Zachovejte licenci; CC BY-SA]] ​ |  ​
 +
 +
 +===== on RaspberryPi 1b =====
 +https://​www.raspberrypi.org/​documentation/​configuration/​device-tree.md
 +<​code>​
 +wget http://​www.airspayce.com/​mikem/​bcm2835/​bcm2835-1.44.tar.gz
 +tar -xvzf bcm2835-1.44.tar.gz
 +cd bcm2835-1.44
 +./configure
 +make
 +sudo make check
 +sudo make install
 +</​code>​
 +===== TO STUDY =====
 +  * https://​github.com/​AdamLaurie/​RFIDIOt - some tools
 +  * http://​jerrygamblin.com/​2015/​12/​05/​25-handheld-rfid-cloner/​ - to clone
  
 ===== RC522 vs BananaPi Pinout =====  ===== RC522 vs BananaPi Pinout ===== 
Line 15: Line 31:
 |CLOCK|23|GPIO11/​SCLK |yellow | |CLOCK|23|GPIO11/​SCLK |yellow |
 |SS|24|COE0#/​GPIO07|green| |SS|24|COE0#/​GPIO07|green|
 +
 +==== RC522 vs RaspberryPI B ====
 +{{projects:​pythonraspberrypi_rfid.png}}
 +
 +
 +Reference: ​
 +  * https://​en.wikipedia.org/​wiki/​Serial_Peripheral_Interface_Bus
 +  * http://​wiki.lemaker.org/​BananaPro/​Pi:​Pin_definition
 +
 +  * SCLK : Serial Clock (output from master).
 +  * MOSI : Master Output, Slave Input (output from master).
 +  * MISO : Master Input, Slave Output (output from slave).
 +  * SS : Slave Select (active low, output from master).
 +
   ​   ​
  
Line 36: Line 66:
 ===== Python to control GPI ===== ===== Python to control GPI =====
  
 +  * http://​raspmer.blogspot.cz/​2015/​07/​how-to-use-rfid-rc522-on-raspbian.html
 +
 +  * !!!!! http://​blog.infraserver.eu/?​p=285 -->
 +
 +  * On Raspberry Pi, Device Tree usage is controlled from /​boot/​config.txt. By
 +default, the Raspberry Pi kernel boots with device tree enabled. You can
 +completely disable DT usage (for now) by adding:
 +<​code>​
 +    device_tree=
 +</​code>​
 <​code>​ <​code>​
 [root@picka ~]# aptitude install python-dev [root@picka ~]# aptitude install python-dev
Line 74: Line 114:
  
 [root@picka ~]# cd MFRC522-python ​ [root@picka ~]# cd MFRC522-python ​
 +
 +[root@picka MFRC522-python]#​ python Read.py
 +BAPI: Banana Pi!!
 +BAPI: Banana Pi!!
 +BAPI: Banana Pi!!
 +BAPI: Banana Pi!!
 +BAPI: revision(3)
 +Welcome to the MFRC522 data read example
 +Press Ctrl-C to stop.
 +Card read UID: 100,​83,​136,​50
 +Size: 8
 +Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 +Card detected
 +Card read UID: 100,​83,​136,​50
 +Size: 8
 +Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 +Card detected
 +Card read UID: 100,​83,​136,​50
 +Size: 8
 +Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 +Card detected
 +Card read UID: 100,​83,​136,​50
 +Size: 8
 +Sector 8 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
 </​code>​ </​code>​
  
 +===== READ NFC522 by node-red =====
 +   * http://​flows.nodered.org/​node/​node-red-contrib-gpio
 +   * http://​flows.nodered.org/​node/​node-red-node-bananapi
 +   * http://​flows.nodered.org/​node/​node-red-node-irc
 +<​code>​
 +[root@picka ~]# node -v
 +v0.10.29
  
 +sudo npm cache clean -f
 +sudo npm install -g n
 +sudo n stable
 +# version can be switched by: sudo n 0.8.21
  
 +[root@picka ~]# shutdown -r now
 +
 +[root@picka ~]# node -v
 +v6.2.0
 +
 +[root@picka ~]# node-red-admin install node-red-node-irc
 +#​[root@picka ~]# npm install node-pre-gyp
 +#​[root@picka ~]# npm install node-red-contrib-gpio
 +#root@picka ~]# npm install raspi-io
 +#​[root@picka ~]# npm install node-red-node-irc
 +
 +
 +[root@picka ~]# shutdown -r now
 +</​code>​
  • projects/rfid.txt
  • Last modified: 2016/06/14 04:21
  • by over23