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
projects:rfid [2016/05/27 18:33]
over23 header added
projects:rfid [2016/06/14 04:21]
over23
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]] | +|**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]]] | 
-| **License:​** | [[https://​creativecommons.org/​licenses/​by-sa/​3.0/​|Uveďte původ-Zachovejte licenci; CC BY-SA]] ​ |   +|**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]] ​ |  ​ 
-  ​+ 
 + 
 +===== 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 =====  
 +|**RFID-RC522 Pin**|**Banana Pi Pin**|**Banana PI Pin Name**|**Cable color**| 
 +|3.3V|1|+3.3V|Red| 
 +|GND|6|GND|Black| 
 +|MOSI|19|GPIO10/​MOSI |brown | 
 +|MISO|21|GPIO09/​MSO |blue | 
 +|CLOCK|23|GPIO11/​SCLK |yellow | 
 +|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). 
   ​   ​
  
 +
 +===== SPI Pins kernel module [Specific for BananaPI] =====
 <​code>​ <​code>​
 [root@picka ~]# echo "​spi-sun7i"​ >> /​etc/​modules [root@picka ~]# echo "​spi-sun7i"​ >> /​etc/​modules
Line 23: Line 63:
 lcd                     ​3778 ​ 0  lcd                     ​3778 ​ 0 
 </​code>​ </​code>​
-  ​pinout nesedidoplnit pro Banana+ 
 +===== 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 PiDevice 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>​ 
 +   ​XXXXXX---- nefunguje device_tree= 
 +</​code>​ 
 +  * mozna chcem novy git clone https://​github.com/​RPi-Distro/​raspi-config 
 +  * a tam poresit tree 
 + 
 <​code>​ <​code>​
 [root@picka ~]# aptitude install python-dev [root@picka ~]# aptitude install python-dev
Line 62: Line 118:
  
 [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>​
  
-|RFID-RC522 Pin | Banana Pi Pin | Banana PI Pin Name| Cable clor | +===== READ NFC522 by node-red ===== 
-|3.3V |1 | +3.3V| Red| +   * http://​flows.nodered.org/node/​node-red-contrib-gpio 
-|GND |6 | GND | Black | +   * http://​flows.nodered.org/​node/​node-red-node-bananapi 
-|MOSI |19 | GPIO10/MOSI | brown | +   * http://​flows.nodered.org/​node/​node-red-node-irc 
-|MISO |21 | GPIO09/MSO | blue | +<​code>​ 
-|CLOCK |23 | GPIO11/SCLK | yellow | +[root@picka ~]node -v 
-|SS |24 | COE0#/GPIO07| green |+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