{"id":714,"date":"2020-08-13T22:52:37","date_gmt":"2020-08-13T14:52:37","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=714"},"modified":"2020-08-13T22:52:37","modified_gmt":"2020-08-13T14:52:37","slug":"%e5%9c%a8%e6%a0%91%e8%8e%93%e6%b4%be3b%e4%b8%8a%e4%bd%bf%e7%94%a8rfid%e6%a8%a1%e5%9d%97rc522%ef%bc%88python%e5%ae%9e%e7%8e%b0%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=714","title":{"rendered":"\u5728\u6811\u8393\u6d3e3B\u4e0a\u4f7f\u7528RFID\u6a21\u5757RC522\uff08Python\u5b9e\u73b0\uff09"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"toc_2\">1.\u5f00\u542fSPI\u4e0eI2C<\/h3>\n\n\n\n<p>\u5728Terminal\u4e2d\u8f93\u5165raspi-config \u5728Advanced Options\u4e2d\u6253\u5f00SPI\u548cI2C<br><strong>*\u4e00\u5b9a\u8981\u6253\u5f00I2C\uff0c\u672c\u4eba\u5728\u53ea\u5f00\u542fSPI\u7684\u60c5\u51b5\u4e0b\u64cd\u4f5c\u65e0\u53cd\u5e94<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_3\">2.\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\u6587\u4ef6SPI.py<\/h3>\n\n\n\n<p>git clone https:\/\/github.com\/lthiery\/SPI-Py.git cd SPI-Py sudo python setup.py install<\/p>\n\n\n\n<p>\u5982\u679c\u6ca1\u6709git\u5148\u5b89\u88c5Git\uff0c\u6211\u4f7f\u7528\u7684Raspbian\u81ea\u5e26\u3002 sudo apt-get install git<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_4\">3.\u8fde\u63a5\u6811\u8393\u6d3e\u4e0eRC522\u8bfb\u5361\u5668<\/h3>\n\n\n\n<p>\u53c2\u8003\u8fde\u63a5\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>PIN NUM<\/th><th>RC522<\/th><th>PIN NAME<\/th><\/tr><\/thead><tbody><tr><td>24<\/td><td>SDA<\/td><td>GPIO8<\/td><\/tr><tr><td>23<\/td><td>SCK<\/td><td>GPIO11<\/td><\/tr><tr><td>19<\/td><td>MOSI<\/td><td>GPIO10<\/td><\/tr><tr><td>21<\/td><td>MISO<\/td><td>GPIO9<\/td><\/tr><tr><td>None<\/td><td>IRQ<\/td><td>None<\/td><\/tr><tr><td>6<\/td><td>GND<\/td><td>Ground<\/td><\/tr><tr><td>22<\/td><td>RST<\/td><td>GPIO25<\/td><\/tr><tr><td>1<\/td><td>3.3V<\/td><td>3V3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_5\">4.\u4e0b\u8f7dRC522\u7a0b\u5e8f<\/h3>\n\n\n\n<p><code>git clone $ git clone https:\/\/github.com\/mxgxw\/MFRC522-python.git<br>cd MFRC522-python<br>sudo python Read.py<\/code> git clone https:\/\/github.com\/mxgxw\/MFRC522-python.gitcd MFRC522-pythonsudo python Read.py<\/p>\n\n\n\n<p>\u53ef\u4ee5\u8bfb\u53d6RFID\u7684\u5361\u53f7\u7b49\u4fe1\u606f<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc_6\">5.\u81ea\u5df1\u4fee\u6539\u7a0b\u5e8f<\/h3>\n\n\n\n<p>\u6211\u53ea\u9700\u8981\u7528\u5230\u8bfb\u5361\u529f\u80fd\uff0c\u81ea\u5df1\u4fee\u6539Read.py\u3002<br>\u53c2\u8003\u7684\u6700\u540e\u4e00\u4e2a\u662fGithub\u4e0aPython\u64cd\u4f5cRC522\u6700\u65b0\u7684\u5f00\u6e90\u4ee3\u7801<br>\u8fdb\u884c\u4e86\u91cd\u65b0\u5206\u88c5\u7b49\u64cd\u4f5c\uff0c\u4e0eMFRC522-python\u5927\u540c\u5c0f\u5f02\uff0c\u53ef\u4ee5\u53c2\u8003\u4f7f\u7528\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u672c\u6587\u53c2\u8003\uff1a<br><a href=\"http:\/\/www.qisanfen.com\/?p=619\" target=\"_blank\"  rel=\"nofollow\" >\u6811\u8393\u6d3e\u4f7f\u7528RFID-RC522A\u8bfb\u5361\u5668\u5bf9IC\u5361\u8fdb\u884c\u8bfb\u5199(\u901a\u8fc7 python)<\/a><br><a href=\"http:\/\/fuenteabierta.teubi.co\/2013\/07\/utilizando-el-lector-nfc-rc522-en-la.html\" target=\"_blank\"  rel=\"nofollow\" >I2C\u5f00\u542f\u91cd\u8981\u63d0\u793a\u6765\u6e90-\u897f\u73ed\u7259\u8bed\u7f51\u9875\u9700\u8981\u7ffb\u8bd1<\/a><br><a href=\"https:\/\/github.com\/mxgxw\/MFRC522-python\" target=\"_blank\"  rel=\"nofollow\" >Github-MFRC522-python<\/a><br><a href=\"https:\/\/github.com\/ondryaso\/pi-rc522\" target=\"_blank\"  rel=\"nofollow\" >Github-pi-rc522<\/a><\/p><\/blockquote>\n\n\n\n<p><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"714\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>1.\u5f00\u542fSPI\u4e0eI2C \u5728Terminal\u4e2d\u8f93\u5165raspi-config \u5728Advanced Options\u4e2d\u6253\u5f00SPI\u548cI2C* &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9,11],"tags":[],"class_list":["post-714","post","type-post","status-publish","format-standard","hentry","category-arduino","category-9","category-11"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=714"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/714\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}