{"id":274756,"date":"2016-02-23T00:50:01","date_gmt":"2016-02-22T21:50:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=274756"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=274756","title":{"rendered":"\u0421\u041a\u0423\u0414, \u043c\u0430\u043b\u0438\u043d\u0430 \u0438 \u0447\u0430\u0439\u043d\u0438\u043a"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/72d\/edc\/5cf\/72dedc5cf4bb70e28103db455e672d3d.jpg\" alt=\"image\"\/>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043b\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u0430 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"http:\/\/malina-shop.ru\/products\/19886623\">\u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e RFID \u043c\u043e\u0434\u0443\u043b\u044f RC522<\/a>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0435\u0440\u0438, \u043d\u043e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. <\/p>\n<p>  \u0412 \u0432\u0438\u0434\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0441 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 RFID \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 13,56 \u041c\u0413\u0446 \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u0440\u0442 \u0438 \u0447\u0438\u043f\u043e\u0432 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u0435\u0449\u0451 \u0438 \u0435\u0434\u0438\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u0437\u0434\u043d\u044b\u0435 \u0431\u0438\u043b\u0435\u0442\u044b \u041c\u043e\u0441\u043a\u0432\u044b (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u0435\u0434\u0438\u043d\u044b\u0439 \u0431\u0438\u043b\u0435\u0442), \u0430 \u0442\u0430\u043a\u0436\u0435 NFC-\u043c\u0435\u0442\u043a\u0438.<a name=\"habracut\"><\/a><\/p>\n<h4><b>Hardware<\/b><\/h4>\n<p>  \u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/c9c\/d98\/8c0\/c9cd988c00da87017ac09638ea1525a1.jpg\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u043e\u0434\u043e\u0432 \u0438 \u043f\u044c\u0435\u0437\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a. \u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0434\u0438\u043e\u0434\u044b \u2014 \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0437\u0430\u043c\u043a\u0430 (\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u2014 \u0437\u0430\u043c\u043e\u043a \u0437\u0430\u043a\u0440\u044b\u0442, \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u2014 \u0437\u0430\u043c\u043e\u043a \u043e\u0442\u043a\u0440\u044b\u0442), \u0436\u0435\u043b\u0442\u044b\u0439 \u0434\u0438\u043e\u0434 \u2014 \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 (\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u0437\u0430\u043c\u043e\u043a), \u043f\u044c\u0435\u0437\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a \u2014 \u043f\u043e\u0434\u0430\u0435\u0442 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0437\u0430\u043c\u043a\u0430 \u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0441 \u0437\u0430\u043c\u043a\u043e\u043c \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u043b\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043f\u044c\u044e \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0437\u0430\u043c\u043a\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u043e\u0434\u043e\u0432 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/acb\/fd5\/1a3\/acbfd51a3c2e343e7a78da32c89c57b7.jpg\" alt=\"image\"\/>  <\/div>\n<\/div>\n<h4><b>Software<\/b><\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c SPI \u043d\u0430 Raspberry, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/geektimes.ru\/post\/271058\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0430\u0448\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043a\u0430\u0440\u0442. \u0414\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e \u0447\u0442\u0435\u043d\u0438\u0435, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0447\u0442\u0435\u043d\u0438\u0435 UID \u043a\u0430\u0440\u0442\u044b, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438:  <\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/mxgxw\/MFRC522-python <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c SPI-py:  <\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/lthiery\/SPI-Py sudo python \/SPI-Py\/setup.py install <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c UID \u043a\u0430\u0440\u0442\u044b \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432 \u043d\u0435\u0451 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438\u0445 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">cd MFRC522-python sudo python Read.py <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f:  <\/p>\n<pre><code class=\"bash\">Welcome to the MFRC522 data read example Press Ctrl-C to stop. <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u0435\u0441\u0442\u0438 \u043a \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443 \u0438\u043b\u0438 \u043c\u0435\u0442\u043a\u0443 \u0438 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0435\u0451 UID  <\/p>\n<pre><code class=\"bash\">Card detected Card read UID: 60,56,197,101 Size: 8 Sector 8 [12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c: <b>UID: 60,56,197,101<\/b>.<br \/>  \u0410 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">, \u0437\u0430\u043c\u0435\u043d\u044f\u044f \u043d\u0443\u043b\u0438 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043d\u0430\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438: <b>Sector 8 [12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]<\/b>, \u043d\u043e \u044d\u0442\u043e \u043d\u0430\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442.<\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 python \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442 \u0441 \u043c\u043e\u0438\u043c\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python  import RPi.GPIO as GPIO import MFRC522 import signal import time  red = 11 green = 18 speaker = 16 doorlock = 12  # \u0421\u043f\u0438\u0441\u043e\u043a UID \u043a\u0430\u0440\u0442 (UID \u043a\u0430\u0440\u0442\u044b \u0443\u0437\u043d\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e sudo python \/MFRC522-python\/Read.py card_01 = '6056197101' #white card_02 = '148167101184' #fob card_03 = '13652116101' #\u0435\u0434\u0438\u043d\u044b\u0439  #\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0440\u0442\u043e\u0432 \u0432\u044b\u0432\u043e\u0434\u0430 GPIO.setmode(GPIO.BOARD) # \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0438\u043d\u044b \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0441 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e (3v3 - \u043f\u0435\u0440\u0432\u044b\u0439) GPIO.setup(red, GPIO.OUT, initial=1) # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0438\u043d 18 \u043d\u0430 \u0432\u044b\u0432\u043e\u0434 GPIO.setup(green, GPIO.OUT, initial=0) # \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u043f\u0438\u043d\u043e\u043c 11 GPIO.setup(speaker, GPIO.OUT, initial=0) # \u043f\u0438\u043d 16 GPIO.setup(doorlock, GPIO.OUT, initial=0) # \u043f\u0438\u043d 12  continue_reading = True  def end_read(signal,frame): # \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0438 \u043a\u0430\u043a \u0435\u0451 \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c     global continue_reading     print &quot;Ctrl+C captured, ending read.&quot;     continue_reading = False     GPIO.cleanup()  # Create an object of the class MFRC522 (??) MIFAREReader = MFRC522.MFRC522()  while continue_reading:  # \u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u044b - \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0438\u0445 UID     (status,TagType) = MIFAREReader.MFRC522_Request(MIFAREReader.PICC_REQIDL)      # \u0415\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0443 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u043f\u0438\u0448\u0435\u043c &quot;\u043a\u0430\u0440\u0442\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430&quot;     if status == MIFAREReader.MI_OK:         print &quot;Card detected&quot;      # \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c UID \u043a\u0430\u0440\u0442\u044b     (status,uid) = MIFAREReader.MFRC522_Anticoll()      # \u0415\u0441\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u043b\u0438 UID, \u0442\u043e \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435     if status == MIFAREReader.MI_OK:         # \u0432\u044b\u0432\u043e\u0434\u0438\u043c UID \u043a\u0430\u0440\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d         UIDcode = str(uid[0])+str(uid[1])+str(uid[2])+str(uid[3])         print UIDcode          # \u0415\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u0430 \u0435\u0441\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435         if UIDcode == card_01 or UIDcode == card_03 or UIDcode == card_02:         # \u0442\u043e \u0434\u0432\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f         # \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u043c\u043e\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0434\u0430\u0447\u0435 \u043d\u0430         # \u043d\u0435\u0433\u043e (\u043d\u0430 \u0440\u0435\u043b\u0435, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0437\u0430\u043c\u043a\u043e\u043c), \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f         # \u0442.\u0435. \u0438\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0435 \u0440\u0435\u043b\u0435         # \u0442.\u0435. \u0437\u0430\u043c\u043e\u043a \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043f\u0438\u043d\u0430 doorlock         # \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0433\u043e\u0440\u0438\u0442 \u0437\u0435\u043b\u0435\u043d\u0430\u044f, \u0442\u0443\u0445\u043d\u0435\u0442 \u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0438 \u043f\u0438\u0449\u0438\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u043a                  GPIO.output((red, green, speaker, doorlock), (0,1,1,1))                 print &quot;Door open&quot;                  # \u0443\u0441\u043f\u0435\u0442\u044c \u0434\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u0430 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443                 time.sleep(1)                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                  # \u043f\u043e\u0442\u043e\u043c \u0434\u0432\u0435\u0440\u044c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043e \u0447\u0435\u043c \u043d\u0430\u0441 \u0438\u0437\u0432\u0435\u0449\u0430\u044e\u0442                 print &quot;Door closed&quot;          # \u0410 \u0435\u0441\u043b\u0438 \u043a\u0430\u0440\u0442\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043d\u0435\u0442, \u0442\u043e \u043c\u043e\u0440\u0433\u0430\u0435\u043c \u0438 \u043f\u0438\u0449\u0438\u043c         else:                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                 time.sleep(0.05)  \t\tGPIO.output((red, green, speaker, doorlock), (1,0,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,0,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (0,1,1,0))                 time.sleep(0.05)                 GPIO.output((red, green, speaker, doorlock), (1,0,0,0))                 print &quot;Unrecognised Card&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"bash\">nano rf.py <\/code><\/pre>\n<p>  \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b (CTRL+x, y).<br \/>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439  <\/p>\n<pre><code class=\"bash\">sudo python rf.py <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<br \/>  \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0438\u043e\u0434 \u0437\u0430\u0433\u043e\u0440\u0438\u0442\u0441\u044f, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 \u00ab\u0437\u0430\u043c\u043e\u043a\u00bb \u0437\u0430\u043a\u0440\u044b\u0442.<br \/>  \u0415\u0441\u043b\u0438 \u043a \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0434\u043d\u0435\u0441\u0435\u043d\u0430 \u043a\u0430\u0440\u0442\u0430, \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 (\u0431\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u044b\u0445) \u0432\u043d\u0435\u0441\u0435\u043d \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u0442\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0438\u043e\u0434 \u043f\u043e\u0442\u0443\u0445\u043d\u0435\u0442, \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0434\u0438\u043e\u0434 \u0437\u0430\u0433\u043e\u0440\u0438\u0442\u0441\u044f, \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f, \u0447\u0442\u043e \u00ab\u0437\u0430\u043c\u043e\u043a\u00bb \u043e\u0442\u043a\u0440\u044b\u0442, \u0436\u0435\u043b\u0442\u044b\u0439 \u0434\u0438\u043e\u0434 \u0437\u0430\u0433\u043e\u0440\u0438\u0442\u0441\u044f \u2014 \u043e\u043d \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0439\u00bb, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043d\u0430 \u00ab\u0437\u0430\u043c\u043e\u043a\u00bb \u0438\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b, \u043f\u044c\u0435\u0437\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0437\u0430\u043f\u0438\u0449\u0438\u0442. \u0427\u0435\u0440\u0435\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0443) \u0434\u0438\u043e\u0434\u044b \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0432\u0435\u0440\u043d\u0443\u0442\u0441\u044f \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0442\u044c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u044b.<br \/>  \u0415\u0441\u043b\u0438 \u043a \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0434\u043d\u0435\u0441\u0435\u043d\u0430 \u043a\u0430\u0440\u0442\u0430 \u043d\u0435 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430, \u0442\u043e \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438 \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0434\u0438\u043e\u0434 \u0431\u0443\u0434\u0443\u0442 \u043c\u0438\u0433\u0430\u0442\u044c, \u043f\u044c\u0435\u0437\u043e\u0434\u0438\u043d\u0430\u043c\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0438\u0441\u0442\u043e \u043f\u0438\u0449\u0430\u0442\u044c, \u0441\u0438\u0433\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u043e\u0448\u0438\u0431\u043a\u0443, \u0436\u0435\u043b\u0442\u044b\u0439 \u0434\u0438\u043e\u0434 \u043d\u0435 \u0437\u0430\u0433\u043e\u0440\u0438\u0442\u0441\u044f (\u0442.\u0435. \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u00ab\u0437\u0430\u043c\u043a\u0430\u00bb \u043d\u0435 \u0438\u0434\u0435\u0442). \u0427\u0443\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u0432\u0441\u0435 \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e.<\/p>\n<p>  \u041a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0438\u0434\u0435\u043e, \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0449\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0443:<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/4z6fXMZl74A?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe>               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/geektimes.ru\/post\/271498\/\"> https:\/\/geektimes.ru\/post\/271498\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/72d\/edc\/5cf\/72dedc5cf4bb70e28103db455e672d3d.jpg\" alt=\"image\"\/>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043b\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u0430 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"http:\/\/malina-shop.ru\/products\/19886623\">\u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e RFID \u043c\u043e\u0434\u0443\u043b\u044f RC522<\/a>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0435\u0440\u0438, \u043d\u043e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0443\u0442\u0435\u043c \u043f\u043e\u0434\u0430\u0447\u0438 \u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0430\u0447\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430. <\/p>\n<p>  \u0412 \u0432\u0438\u0434\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0441 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 RFID \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 13,56 \u041c\u0413\u0446 \u0438 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u0440\u0442 \u0438 \u0447\u0438\u043f\u043e\u0432 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439, \u0435\u0449\u0451 \u0438 \u0435\u0434\u0438\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u0437\u0434\u043d\u044b\u0435 \u0431\u0438\u043b\u0435\u0442\u044b \u041c\u043e\u0441\u043a\u0432\u044b (\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u0435\u0434\u0438\u043d\u044b\u0439 \u0431\u0438\u043b\u0435\u0442), \u0430 \u0442\u0430\u043a\u0436\u0435 NFC-\u043c\u0435\u0442\u043a\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-274756","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274756"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274756\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}