{"id":42827,"date":"2018-06-07T12:19:14","date_gmt":"2018-06-07T06:19:14","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=42827"},"modified":"2022-01-15T12:36:31","modified_gmt":"2022-01-15T06:36:31","slug":"%d1%81%d0%b5%d0%ba%d1%83%d0%bd%d0%b4%d0%be%d0%bc%d0%b5%d1%80-%d0%bd%d0%b0-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=42827","title":{"rendered":"\u0421\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440 \u043d\u0430 Arduino"},"content":{"rendered":"<p>\u0421\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Arduino Nano (Uno), \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 1602. \u041d\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u043e\u0432 (\u0434\u043e 24), \u043c\u0438\u043d\u0443\u0442, \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u0434\u0435\u0441\u044f\u0442\u044b\u0435 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>\u0421\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ul>\n<li>\u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 (1 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430)<\/li>\n<li>\u0412\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u043d\u0430 \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044f \u0432\u0440\u0435\u043c\u044f\u00a0 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430.<\/li>\n<li>\u0422\u0440\u0435\u0442\u044c\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430.<\/li>\n<li>\u041f\u0440\u0438 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0431\u0440\u043e\u0441 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432\u0441\u0435\u0445 \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u043e\u0432.<\/li>\n<\/ul>\n<p>\u041e\u0442\u0441\u0447\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 millis(). \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432 \u043c\u0441, \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u0440\u0435\u043c\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 delay(), \u0438 \u0442.\u043f. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u0441\u0447\u0435\u0442\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 millis() \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043a\u0432\u0430\u0440\u0446\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440\u0430 \u043f\u043b\u0430\u0442\u044b Arduino.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42836\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/Screenshot-07.06.2018-131719.png\" alt=\"\" width=\"556\" height=\"442\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/Screenshot-07.06.2018-131719.png 556w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/Screenshot-07.06.2018-131719-200x159.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/Screenshot-07.06.2018-131719-500x397.png 500w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0435\u0442\u0447:<\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\">#include &lt;LiquidCrystal.h&gt;\r\nLiquidCrystal lcd(<span style=\"color: #d8fa3c;\">12<\/span>, <span style=\"color: #d8fa3c;\">11<\/span>, <span style=\"color: #d8fa3c;\">5<\/span>, <span style=\"color: #d8fa3c;\">4<\/span>, <span style=\"color: #d8fa3c;\">3<\/span>, <span style=\"color: #d8fa3c;\">2<\/span>);<span style=\"color: #aeaeae;\">\/\/ RS,E,D4,D5,D6,D7<\/span>\r\n\r\nunsigned long time0, time1; \r\nbyte ms, s, m, h, ms1, s1, m1, h1, kn, pin, start1, stop1, blok;\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> setup(){\r\n  lcd.begin(<span style=\"color: #d8fa3c;\">16<\/span>, <span style=\"color: #d8fa3c;\">2<\/span>);<span style=\"color: #aeaeae;\">\/\/ LCD 16X2<\/span>\r\n  pinMode(<span style=\"color: #d8fa3c;\">6<\/span>,INPUT);<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 6<\/span>\r\n}\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> loop(){\r\n  kn <span style=\"color: #fbde2d;\">=<\/span> digitalRead(<span style=\"color: #d8fa3c;\">6<\/span>); <span style=\"color: #aeaeae;\">\/\/ \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e \u0432\u0445\u043e\u0434\u0430 6<\/span>\r\n\r\n    <span style=\"color: #fbde2d;\">if<\/span>(kn <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> HIGH <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> start1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> blok <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0447\u0435\u0442\u0430, \u043f\u0435\u0440\u0432\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    start1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u0435\u0441\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0430 start1 = 1, \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/span>\r\n    time1<span style=\"color: #fbde2d;\">=<\/span>millis(); <span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u0441\u0435\u043a\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(millis()<span style=\"color: #fbde2d;\">-<\/span>time1 &lt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">200<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043d\u043e\u043f\u043a\u0438, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f 200 \u043c\u0441<\/span>\r\n    kn <span style=\"color: #fbde2d;\">=<\/span> LOW;\r\n  } \r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(kn <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> HIGH <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> start1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> stop1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>){<span style=\"color: #aeaeae;\">\/\/ \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u0432\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    stop1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>; <span style=\"color: #aeaeae;\">\/\/ \u0431\u044b\u043b\u043e \u0432\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    ms1 <span style=\"color: #fbde2d;\">=<\/span> ms; \r\n    s1 <span style=\"color: #fbde2d;\">=<\/span> s; \r\n    m1 <span style=\"color: #fbde2d;\">=<\/span> m; \r\n    h1 <span style=\"color: #fbde2d;\">=<\/span> h; \r\n    time1 <span style=\"color: #fbde2d;\">=<\/span> millis(); <span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u0441\u0435\u043a\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(millis() <span style=\"color: #fbde2d;\">-<\/span> time1 &lt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">200<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043d\u043e\u043f\u043a\u0438, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f 200 \u043c\u0441<\/span>\r\n    kn <span style=\"color: #fbde2d;\">=<\/span> LOW;\r\n  } \r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(kn <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> HIGH <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> start1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> stop1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>){<span style=\"color: #aeaeae;\">\/\/ \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0447\u0435\u0442\u0430, \u0442\u0440\u0435\u0442\u044c\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    start1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d \u043e\u0442\u0441\u0447\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/span>\r\n    blok <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    time1 <span style=\"color: #fbde2d;\">=<\/span> millis(); <span style=\"color: #aeaeae;\">\/\/ \u0437\u0430\u0441\u0435\u043a\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(millis() <span style=\"color: #fbde2d;\">-<\/span> time1 &lt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">200<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043d\u043e\u043f\u043a\u0438, \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f 200 \u043c\u0441<\/span>\r\n    kn <span style=\"color: #fbde2d;\">=<\/span> LOW;\r\n  } \r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(kn <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> HIGH <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> start1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> stop1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>){<span style=\"color: #aeaeae;\">\/\/ \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043e\u0431\u0449\u0438\u0439 \u0441\u0431\u0440\u043e\u0441<\/span>\r\n    ms <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    s <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    m <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    h <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    ms1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    s1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    m1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    h1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    blok <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    pin <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    start1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    stop1 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n    delay(<span style=\"color: #d8fa3c;\">500<\/span>);<span style=\"color: #aeaeae;\">\/\/ \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c \u0434\u0440\u0435\u0431\u0435\u0437\u0433 \u043a\u043d\u043e\u043f\u043a\u0438 500 \u043c\u0441 \u043f\u0430\u0443\u0437\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u0431\u0440\u043e\u0441\u0430<\/span>\r\n  }\r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(start1 <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n    <span style=\"color: #fbde2d;\">if<\/span>(pin <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u0442\u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438<\/span>\r\n      time0 <span style=\"color: #fbde2d;\">=<\/span> millis();<span style=\"color: #aeaeae;\">\/\/ \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0441\u0447\u0435\u0442\u0430<\/span>\r\n      pin <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">1<\/span>;\r\n    }\r\n\r\n    <span style=\"color: #fbde2d;\">if<\/span>(millis() <span style=\"color: #fbde2d;\">-<\/span> time0 &gt; <span style=\"color: #d8fa3c;\">99<\/span>){\r\n      time0 <span style=\"color: #fbde2d;\">=<\/span> millis();\r\n      <span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>ms; <span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u0441\u0447\u0435\u0442 0,1 \u0441<\/span>\r\n      <span style=\"color: #fbde2d;\">if<\/span>(ms &gt; <span style=\"color: #d8fa3c;\">9<\/span>){\r\n        ms <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n        <span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>s; <span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u0441\u0447\u0435\u0442 1 \u0441<\/span>\r\n      }\r\n      <span style=\"color: #fbde2d;\">if<\/span>(s &gt; <span style=\"color: #d8fa3c;\">59<\/span>){\r\n        s <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>; \r\n        <span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>m; <span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u0441\u0447\u0435\u0442 1 \u043c\u0438\u043d<\/span>\r\n      }\r\n      <span style=\"color: #fbde2d;\">if<\/span>(m &gt; <span style=\"color: #d8fa3c;\">59<\/span>){\r\n        m <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n        <span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>h; <span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u0441\u0447\u0435\u0442 1 \u0447\u0430\u0441<\/span>\r\n      }\r\n      <span style=\"color: #fbde2d;\">if<\/span>(h &gt; <span style=\"color: #d8fa3c;\">23<\/span>){\r\n        h <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n      }\r\n    }\r\n  }\r\n  <span style=\"color: #aeaeae;\">\/\/ \u0432\u044b\u0432\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d 1 \u0441\u0442\u0440\u043e\u043a\u0430<\/span>\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">3<\/span>,<span style=\"color: #d8fa3c;\">0<\/span>); \r\n  <span style=\"color: #fbde2d;\">if<\/span>(h &lt; <span style=\"color: #d8fa3c;\">10<\/span>){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(h); <span style=\"color: #aeaeae;\">\/\/ \u0447\u0430\u0441\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  <span style=\"color: #fbde2d;\">if<\/span>(m &lt; <span style=\"color: #d8fa3c;\">10<\/span> ){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(m); <span style=\"color: #aeaeae;\">\/\/ \u043c\u0438\u043d\u0443\u0442\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  <span style=\"color: #fbde2d;\">if<\/span>(s &lt; <span style=\"color: #d8fa3c;\">10<\/span>){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(s);<span style=\"color: #aeaeae;\">\/\/ \u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(ms);<span style=\"color: #aeaeae;\">\/\/ \u043c\u0441<\/span>\r\n  <span style=\"color: #aeaeae;\">\/\/ \u0432\u044b\u0432\u043e\u0434 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d 2 \u0441\u0442\u0440\u043e\u043a\u0430<\/span>\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">3<\/span>,<span style=\"color: #d8fa3c;\">1<\/span>); \r\n  <span style=\"color: #fbde2d;\">if<\/span>(h1 &lt; <span style=\"color: #d8fa3c;\">10<\/span>){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(h1); <span style=\"color: #aeaeae;\">\/\/ \u0447\u0430\u0441\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  <span style=\"color: #fbde2d;\">if<\/span>(m1 &lt; <span style=\"color: #d8fa3c;\">10<\/span> ){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(m1); <span style=\"color: #aeaeae;\">\/\/ \u043c\u0438\u043d\u0443\u0442\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  <span style=\"color: #fbde2d;\">if<\/span>(s1 &lt; <span style=\"color: #d8fa3c;\">10<\/span>){\r\n    lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"0\"<\/span>);\r\n  }\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(s1);<span style=\"color: #aeaeae;\">\/\/ \u0441\u0435\u043a\u0443\u043d\u0434\u044b<\/span>\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\":\"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(ms1);<span style=\"color: #aeaeae;\">\/\/ \u043c\u0441<\/span>\r\n}\r\n<\/pre>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42830\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52.jpg\" alt=\"\" width=\"4608\" height=\"3456\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52.jpg 4608w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52-200x150.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52-500x375.jpg 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52-768x576.jpg 768w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-52-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 4608px) 100vw, 4608px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42831\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46.jpg\" alt=\"\" width=\"4608\" height=\"3456\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46.jpg 4608w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46-200x150.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46-500x375.jpg 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46-768x576.jpg 768w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-46-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 4608px) 100vw, 4608px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-42832\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58.jpg\" alt=\"\" width=\"4608\" height=\"3456\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58.jpg 4608w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58-200x150.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58-500x375.jpg 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58-768x576.jpg 768w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2018-06-07-11-55-58-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 4608px) 100vw, 4608px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Arduino Nano (Uno), \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 1602. \u041d\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u043e\u0432 (\u0434\u043e 24), \u043c\u0438\u043d\u0443\u0442, \u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u0434\u0435\u0441\u044f\u0442\u044b\u0435 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0421\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439: \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u043e\u043c\u0435\u0440\u0430 (1 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430) \u0412\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0435\u0441\u044f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42836,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-42827","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":26417,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42827","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=42827"}],"version-history":[{"count":7,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42827\/revisions"}],"predecessor-version":[{"id":111580,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/42827\/revisions\/111580"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/42836"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42827"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}