{"id":80526,"date":"2020-07-05T18:24:26","date_gmt":"2020-07-05T12:24:26","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=80526"},"modified":"2022-01-08T18:10:11","modified_gmt":"2022-01-08T12:10:11","slug":"%d0%bc%d0%b0%d1%82%d1%80%d0%b8%d1%87%d0%bd%d0%b0%d1%8f-%d0%ba%d0%bb%d0%b0%d0%b2%d0%b8%d0%b0%d1%82%d1%83%d1%80%d0%b0-4x3-%d0%ba%d0%bd%d0%be%d0%bf%d0%ba%d0%b8-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=80526","title":{"rendered":"\u041c\u0430\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 4\u00d73 \u043a\u043d\u043e\u043f\u043a\u0438 (Arduino)"},"content":{"rendered":"<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-182348-e1593951848711.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-80529\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-182348-e1593951848711.png\" alt=\"\" width=\"253\" height=\"287\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-182348-e1593951848711.png 465w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-182348-e1593951848711-200x227.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-182348-e1593951848711-441x500.png 441w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/a><\/p>\n<p>\u0413\u0438\u0431\u043a\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 4 \u043d\u0430 3 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 \u0431\u0430\u0437\u0435 Arduino \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f 12 \u043a\u043d\u043e\u043f\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 4\u04453 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-164746.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80527\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-164746.png\" alt=\"\" width=\"430\" height=\"385\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-164746.png 430w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-164746-200x179.png 200w\" sizes=\"auto, (max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442, \u043f\u043e\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 1 &#8212; 4. \u0415\u0441\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430, \u0442\u043e \u043f\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u044e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u0445 5 &#8212; 7 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043d\u0430\u0436\u0430\u0442\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0438\u0437 \u0440\u044f\u0434\u0430 1 &#8212; 4.<\/p>\n<p>\u0412 \u0441\u0440\u0435\u0434\u0435 Arduino \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/tremaru\/iarduino_KB.git\">iarduino_KB<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0435\u0442\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0436\u0430\u0442\u044b\u0445 \u043a\u043d\u043e\u043f\u043e\u043a \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 &#171;*&#187; \u0438 &#171;#&#187; \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 14 \u0438 15.<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;iarduino_KB.h&gt;  \/\/ https:\/\/github.com\/tremaru\/iarduino_KB.git<\/span>\r\n\u00a0\r\n iarduino_KB KB<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">8<\/span>,<span style=\"color: #cc66cc;\">7<\/span>,<span style=\"color: #cc66cc;\">6<\/span>,<span style=\"color: #cc66cc;\">5<\/span>,<span style=\"color: #cc66cc;\">4<\/span>,<span style=\"color: #cc66cc;\">3<\/span>,<span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/\/ 8765 432<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  KB.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>KB3<span style=\"color: #66cc66;\">)<\/span>;         \r\n  <span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n   <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">check<\/span><span style=\"color: #66cc66;\">(<\/span>KEY_DOWN <span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">getNum<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n   delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">200<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #808080; font-style: italic;\">\/\/loop<\/span><\/pre>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440:<\/p>\n<blockquote><p>\u044d\u043b\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f 4\u04454, \u0442\u0438\u043f KB1<br \/>\n\u043a\u043d\u043e\u043f\u043e\u0447\u043d\u0430\u044f 4\u04454, \u0442\u0438\u043f KB2<br \/>\n\u044d\u043b\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f 3\u04454, \u0442\u0438\u043f KB3<br \/>\n\u044d\u043b\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f 1\u04454, \u0442\u0438\u043f KB4<\/p><\/blockquote>\n<p>\u0422\u0438\u043f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <strong>KB.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>\u0442\u0438\u043f<span style=\"color: #66cc66;\">)<\/span><\/strong><\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-161043.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80528\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-161043.png\" alt=\"\" width=\"229\" height=\"277\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-161043.png 229w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-161043-200x242.png 200w\" sizes=\"auto, (max-width: 229px) 100vw, 229px\" \/><\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043a\u0435\u0442\u0447\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0447\u0438\u0441\u043b\u043e (\u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0437\u043d\u0430\u0447\u043d\u043e\u0435). \u0421\u0438\u043c\u0432\u043e\u043b &#171;#&#187; \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442 \u0447\u0438\u0441\u043b\u043e, \u0430 \u0441\u0438\u043c\u0432\u043e\u043b &#171;*&#187; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-183512.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80533\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/07\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-07-05-183512.png\" alt=\"\" width=\"133\" height=\"168\" \/><\/a><\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043a\u043d\u043e\u043f\u043a\u0443 5, \u0437\u0430\u0442\u0435\u043c 8, \u0434\u0430\u043b\u0435\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0443 * (\u043a\u043e\u0434 15) \u0438 \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e 58. \u0421\u0430\u043c\u043e \u0447\u0438\u0441\u043b\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>int ccc<\/strong> \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;iarduino_KB.h&gt;  \/\/ https:\/\/github.com\/tremaru\/iarduino_KB.git<\/span>\r\n\u00a0\r\n iarduino_KB KB<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">8<\/span>,<span style=\"color: #cc66cc;\">7<\/span>,<span style=\"color: #cc66cc;\">6<\/span>,<span style=\"color: #cc66cc;\">5<\/span>,<span style=\"color: #cc66cc;\">4<\/span>,<span style=\"color: #cc66cc;\">3<\/span>,<span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/\/ 8765 432<\/span>\r\n\u00a0\r\n <span style=\"color: #0066cc;\">int<\/span> code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #66cc66;\">]<\/span>,ccc,i;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  KB.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>KB3<span style=\"color: #66cc66;\">)<\/span>;         \r\n  <span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n   <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">check<\/span><span style=\"color: #66cc66;\">(<\/span>KEY_DOWN <span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n\u00a0\r\n     Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">getNum<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n     code<span style=\"color: #66cc66;\">[<\/span>i<span style=\"color: #66cc66;\">]<\/span> = KB.<span style=\"color: #006600;\">getNum<\/span>; \r\n\u00a0\r\n     <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">getNum<\/span>==<span style=\"color: #cc66cc;\">15<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>i=-<span style=\"color: #cc66cc;\">1<\/span>;ccc=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span> <span style=\"color: #808080; font-style: italic;\">\/\/ # \u0441\u0442\u0435\u0440\u0435\u0442\u044c \u0447\u0438\u0441\u043b\u043e<\/span>\r\n\u00a0\r\n     <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">getNum<\/span>==<span style=\"color: #cc66cc;\">14<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>ccc<span style=\"color: #66cc66;\">)<\/span>;i=-<span style=\"color: #cc66cc;\">1<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span> <span style=\"color: #808080; font-style: italic;\">\/\/ * \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0447\u0438\u0441\u043b\u043e \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430<\/span>\r\n\u00a0\r\n     <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>KB.<span style=\"color: #006600;\">getNum<\/span><span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">&amp;&amp;<\/span>i<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n   <span style=\"color: #b1b100;\">switch<\/span><span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n     <span style=\"color: #b1b100;\">case<\/span> <span style=\"color: #cc66cc;\">0<\/span>: ccc = code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">break<\/span>;\r\n     <span style=\"color: #b1b100;\">case<\/span> <span style=\"color: #cc66cc;\">1<\/span>: ccc = code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">10<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">break<\/span>;\r\n     <span style=\"color: #b1b100;\">case<\/span> <span style=\"color: #cc66cc;\">2<\/span>: ccc = code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">10<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">break<\/span>;\r\n     <span style=\"color: #b1b100;\">case<\/span> <span style=\"color: #cc66cc;\">3<\/span>: ccc = code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">1000<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">10<\/span> + code<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">]<\/span>;<span style=\"color: #b1b100;\">break<\/span>;\r\n    <span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n    i++; <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>i=<span style=\"color: #cc66cc;\">4<\/span>;<span style=\"color: #66cc66;\">}<\/span>delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">200<\/span><span style=\"color: #66cc66;\">)<\/span>; \r\n   <span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #808080; font-style: italic;\">\/\/loop<\/span><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0413\u0438\u0431\u043a\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 4 \u043d\u0430 3 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 \u0431\u0430\u0437\u0435 Arduino \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f 12 \u043a\u043d\u043e\u043f\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0435 4\u04453 \u043f\u043e \u0441\u0445\u0435\u043c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442, \u043f\u043e\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u043d\u0438\u0437\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 1 &#8212; 4. \u0415\u0441\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0430 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":80527,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-80526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":3652,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/80526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80526"}],"version-history":[{"count":6,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/80526\/revisions"}],"predecessor-version":[{"id":111239,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/80526\/revisions\/111239"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/80527"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80526"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}