{"id":43037,"date":"2018-06-18T21:49:39","date_gmt":"2018-06-18T15:49:39","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=43037"},"modified":"2022-01-15T12:34:39","modified_gmt":"2022-01-15T06:34:39","slug":"%d0%b3%d0%b5%d0%bd%d0%b5%d1%80%d0%b0%d1%82%d0%be%d1%80-%d0%bf%d1%80%d1%8f%d0%bc%d0%be%d1%83%d0%b3%d0%be%d0%bb%d1%8c%d0%bd%d1%8b%d1%85-%d0%b8%d0%bc%d0%bf%d1%83%d0%bb%d1%8c%d1%81%d0%be%d0%b2-%d0%bd","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=43037","title":{"rendered":"\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u043d\u0430 Arduino"},"content":{"rendered":"<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0<a href=\"http:\/\/code.google.com\/p\/arduino-timerone\/downloads\/list\"><strong>TimerOne<\/strong><\/a>, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u0428\u0418\u041c \u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0435 9 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 1 \u043c\u043a\u0441 \u0434\u043e 8,3 \u0441\u0435\u043a, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0434\u043e 200 \u043c\u0441 (5 \u0413\u0446), \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0434\u043e 8,3 \u0441\u0435\u043a. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442 0 \u0434\u043e 1023 \u0435\u0434\u0438\u043d\u0438\u0446 (10-\u0431\u0438\u0442), \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 0 \u0438 100%.<\/p>\n<p>\u0412 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u043c \u0432\u0445\u043e\u0434\u0430\u043c 6 \u0438 7 Arduino. 13 \u0432\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c (\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043d\u043e\u043f\u043e\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u044f\u0434 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 LCD 16&#215;2, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0440\u044f\u0434\u0443 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u044b. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0433 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 1 \u043c\u043a\u0441, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 1 \u043c\u043a\u0441 \u044d\u0442\u043e 1 \u041c\u0413\u0446, 2 \u043c\u043a\u0441 &#8212; 500 \u043a\u0413\u0446, 3 \u043c\u043a\u0441 \u044d\u0442\u043e 333,333 \u0413\u0446 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043f\u043e \u043c\u0435\u0440\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u044c \u0435\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43038\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/8345708237832780932.png\" alt=\"\" width=\"692\" height=\"474\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/8345708237832780932.png 692w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/8345708237832780932-200x137.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/8345708237832780932-500x342.png 500w\" sizes=\"auto, (max-width: 692px) 100vw, 692px\" \/><\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\"><span style=\"color: #aeaeae;\">\/\/  rcl-radio.ru<\/span>\r\n<span style=\"color: #aeaeae;\">\/\/  \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u0443\u043b\u044c\u0441\u043e\u0432, \u043f\u0435\u0440\u0438\u043e\u0434 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u043e\u0442 1 \u043c\u043a\u0441 \u0434\u043e 200 \u043c\u0441 (1 \u041c\u0413\u0446...5 \u0413\u0446)<\/span>\r\n#include &lt;TimerOne.h&gt;\r\n#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\nunsigned long t<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">1000<\/span>,f,k<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">512<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e 1000 \u043c\u043a\u0441 (1000 \u0413\u0446), \u043c\u0435\u0430\u043d\u0434\u0440, \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u0443\u043b\u044c\u0441\u0430 \u0440\u0430\u0432\u043d\u0430 \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u0438 k=512 (50%)<\/span>\r\nbyte k1,kn,kn1,kn2;\r\n<span style=\"color: #8da6ce;\">int<\/span> drive,drive0;\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> setup()\r\n{ \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;\">10<\/span>, OUTPUT);\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  pinMode(<span style=\"color: #d8fa3c;\">7<\/span>,INPUT);<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 7<\/span>\r\n  pinMode(<span style=\"color: #d8fa3c;\">13<\/span>,INPUT);<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 13<\/span>\r\n}\r\n<span style=\"color: #8da6ce;\">void<\/span> loop()\r\n{\r\n  Timer1.<span style=\"color: #8da6ce;\">initialize<\/span>(t); <span style=\"color: #aeaeae;\">\/\/ \u043f\u0435\u0440\u0438\u043e\u0434    <\/span>\r\n  Timer1.pwm(<span style=\"color: #d8fa3c;\">9<\/span>, k); <span style=\"color: #aeaeae;\">\/\/ k - \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f 0-1023. \u0421\u0438\u0433\u043d\u0430\u043b \u0441\u043d\u0438\u043c\u0430\u0435\u043c \u0441 \u0432\u044b\u0445\u043e\u0434\u0430 9<\/span>\r\n  kn<span style=\"color: #fbde2d;\">=<\/span>digitalRead(<span style=\"color: #d8fa3c;\">6<\/span>); <span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u0445\u043e\u0434 6 (- \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430)<\/span>\r\n  kn1<span style=\"color: #fbde2d;\">=<\/span>digitalRead(<span style=\"color: #d8fa3c;\">7<\/span>);<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u0445\u043e\u0434 7 (+ \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430)<\/span>\r\n  kn2<span style=\"color: #fbde2d;\">=<\/span>digitalRead(<span style=\"color: #d8fa3c;\">13<\/span>);<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u0445\u043e\u0434 13 (+ \u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f)<\/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: #aeaeae;\">\/\/ \u0443\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430<\/span>\r\n    drive<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>;\r\n    <span style=\"color: #fbde2d;\">if<\/span>(drive&lt;<span style=\"color: #d8fa3c;\">30<\/span>){ \r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">1<\/span>;  \r\n    }\r\n    <span style=\"color: #aeaeae;\">\/\/ \u0435\u0441\u043b\u0438 \u0434\u043e\u043b\u0433\u043e \u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u044510 \u0445100 \u04451000<\/span>\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive&gt;<span style=\"color: #d8fa3c;\">30<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> drive&lt;<span style=\"color: #d8fa3c;\">60<\/span> ){ \r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">10<\/span>; \r\n    }\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive&gt;<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">60<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> drive&lt;<span style=\"color: #d8fa3c;\">100<\/span>){\r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">100<\/span>;\r\n    }\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive&gt;<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">100<\/span>){\r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">1000<\/span>;\r\n    }\r\n  }\r\n  <span style=\"color: #fbde2d;\">else<\/span>{\r\n    drive<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">0<\/span>;\r\n  }\r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(kn1<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span>HIGH){<span style=\"color: #aeaeae;\">\/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0430<\/span>\r\n    drive0<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>;\r\n    <span style=\"color: #fbde2d;\">if<\/span>(drive0&lt;<span style=\"color: #d8fa3c;\">30<\/span>){\r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #d8fa3c;\">1<\/span>; \r\n      <span style=\"color: #aeaeae;\">\/\/ \u0435\u0441\u043b\u0438 \u0434\u043e\u043b\u0433\u043e \u0434\u0435\u0440\u0436\u0430\u0442 \u043a\u043d\u043e\u043f\u043a\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u044510 \u0445100 \u04451000<\/span>\r\n    }\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive0&gt;<span style=\"color: #d8fa3c;\">30<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> drive0&lt;<span style=\"color: #d8fa3c;\">60<\/span> ){ \r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #d8fa3c;\">10<\/span>; \r\n    }\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive0&gt;<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">60<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> drive0&lt;<span style=\"color: #d8fa3c;\">100<\/span>){\r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #d8fa3c;\">100<\/span>;\r\n    }\r\n    <span style=\"color: #fbde2d;\">else<\/span> <span style=\"color: #fbde2d;\">if<\/span>(drive0&gt;<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">100<\/span>){\r\n      t<span style=\"color: #fbde2d;\">=<\/span>t<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #d8fa3c;\">1000<\/span>;\r\n    }\r\n  } \r\n  <span style=\"color: #fbde2d;\">else<\/span>{\r\n    drive0<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">0<\/span>;\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(t<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">0<\/span> || t&gt;<span style=\"color: #d8fa3c;\">300000<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043f\u043e \u043c\u0438\u043d\u0438\u043c\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 0 \u043c\u043a\u0441 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 300 \u043c\u0441 (3,33 \u0413\u0446), \u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434 \u0440\u0430\u0432\u0435\u043d 1 \u043c\u043a\u0441<\/span>\r\n    t<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">1<\/span>;\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(t&gt;<span style=\"color: #d8fa3c;\">200000<\/span> <span style=\"color: #fbde2d;\">&amp;<\/span><span style=\"color: #fbde2d;\">&amp;<\/span> t&lt;<span style=\"color: #d8fa3c;\">300000<\/span>){ <span style=\"color: #aeaeae;\">\/\/ \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 200 \u043c\u0441, \u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 300 \u043c\u0441 (3,33 \u0413\u0446), \u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434 \u0440\u0430\u0432\u0435\u043d 200 \u043c\u0441 (5 \u0413\u0446)<\/span>\r\n    t<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">200000<\/span>;\r\n  } \r\n  f<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">1000000<\/span><span style=\"color: #fbde2d;\">\/<\/span>t; <span style=\"color: #aeaeae;\">\/\/ \u0440\u0430\u0441\u0447\u0435\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u044b<\/span>\r\n  k1<span style=\"color: #fbde2d;\">=<\/span>k<span style=\"color: #fbde2d;\">*<\/span><span style=\"color: #d8fa3c;\">100<\/span><span style=\"color: #fbde2d;\">\/<\/span><span style=\"color: #d8fa3c;\">1024<\/span>; <span style=\"color: #aeaeae;\">\/\/ \u0440\u0430\u0441\u0447\u0435\u0442 % \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/span>\r\n\r\n  <span style=\"color: #fbde2d;\">if<\/span>(kn2<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span>HIGH){<span style=\"color: #aeaeae;\">\/\/ \u043a\u043d\u043e\u043f\u043a\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u043f\u043e \u043a\u0440\u0443\u0433\u0443 \u043e\u0442 50 \u0434\u043e 100%, \u0434\u0430\u043b\u0435\u0435 \u043e\u0442 0 \u0434\u043e 100%)<\/span>\r\n    k<span style=\"color: #fbde2d;\">=<\/span>k<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #d8fa3c;\">16<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u0448\u0430\u0433 16 \u0438\u0437 1024 (\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c 8 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438)<\/span>\r\n  }\r\n  <span style=\"color: #fbde2d;\">if<\/span>(k<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">1024<\/span>){\r\n    k<span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #d8fa3c;\">0<\/span>;\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 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440<\/span>\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">0<\/span>,<span style=\"color: #d8fa3c;\">0<\/span>); \r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"T=\"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(t);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" us\"<\/span>);\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">12<\/span>,<span style=\"color: #d8fa3c;\">0<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(k1);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" %\"<\/span>);\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">0<\/span>,<span style=\"color: #d8fa3c;\">1<\/span>); \r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"F=\"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(f);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" Hz\"<\/span>);\r\n  delay(<span style=\"color: #d8fa3c;\">300<\/span>);\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">0<\/span>,<span style=\"color: #d8fa3c;\">0<\/span>); \r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"                \"<\/span>);\r\n  lcd.setCursor(<span style=\"color: #d8fa3c;\">0<\/span>,<span style=\"color: #d8fa3c;\">1<\/span>); \r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"                \"<\/span>);\r\n}\r\n<\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043e\u0440\u0433\u0430\u043d\u044b \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p style=\"text-align: center;\">\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43039\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/38796857236.png\" alt=\"\" width=\"592\" height=\"227\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/38796857236.png 592w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/38796857236-200x77.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/38796857236-500x192.png 500w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43041\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/3465789652387.png\" alt=\"\" width=\"307\" height=\"176\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/3465789652387.png 307w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/3465789652387-200x115.png 200w\" sizes=\"auto, (max-width: 307px) 100vw, 307px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43040\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/436278569328.png\" alt=\"\" width=\"507\" height=\"170\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/436278569328.png 507w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/436278569328-200x67.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/436278569328-500x168.png 500w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43043\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/43657894326.png\" alt=\"\" width=\"379\" height=\"222\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/43657894326.png 379w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/43657894326-200x117.png 200w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43042\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/673894267562.png\" alt=\"\" width=\"518\" height=\"264\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/673894267562.png 518w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/673894267562-200x102.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/673894267562-500x255.png 500w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43045\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/7234698763427983.png\" alt=\"\" width=\"674\" height=\"242\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/7234698763427983.png 674w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/7234698763427983-200x72.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/7234698763427983-500x180.png 500w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43044\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/73456789236487234.png\" alt=\"\" width=\"562\" height=\"187\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/73456789236487234.png 562w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/73456789236487234-200x67.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/73456789236487234-500x166.png 500w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43046\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374657326723489.png\" alt=\"\" width=\"669\" height=\"277\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374657326723489.png 669w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374657326723489-200x83.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374657326723489-500x207.png 500w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43047\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/698762373284.png\" alt=\"\" width=\"471\" height=\"155\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/698762373284.png 471w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/698762373284-200x66.png 200w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43049\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374589623487623.png\" alt=\"\" width=\"724\" height=\"241\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374589623487623.png 724w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374589623487623-200x67.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/374589623487623-500x166.png 500w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43048\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/734567852392.png\" alt=\"\" width=\"655\" height=\"219\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/734567852392.png 655w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/734567852392-200x67.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/734567852392-500x167.png 500w\" sizes=\"auto, (max-width: 655px) 100vw, 655px\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43052\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2371678523698.png\" alt=\"\" width=\"628\" height=\"241\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2371678523698.png 628w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2371678523698-200x77.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2371678523698-500x192.png 500w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43050\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/87043987598324.png\" alt=\"\" width=\"584\" height=\"166\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/87043987598324.png 584w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/87043987598324-200x57.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/87043987598324-500x142.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-43051\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2347689643987634298.png\" alt=\"\" width=\"672\" height=\"277\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2347689643987634298.png 672w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2347689643987634298-200x82.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/06\/2347689643987634298-500x206.png 500w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0TimerOne, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442\u00a0\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u0433\u043d\u0430\u043b \u0428\u0418\u041c \u043d\u0430 \u0432\u044b\u0432\u043e\u0434\u0435 9 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 1 \u043c\u043a\u0441 \u0434\u043e 8,3 \u0441\u0435\u043a, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0434\u043e 200 \u043c\u0441 (5 \u0413\u0446), \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0434\u043e 8,3 \u0441\u0435\u043a. \u0422\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442 0 \u0434\u043e 1023 \u0435\u0434\u0438\u043d\u0438\u0446 (10-\u0431\u0438\u0442), \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":43038,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-43037","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":36387,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43037","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=43037"}],"version-history":[{"count":6,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43037\/revisions"}],"predecessor-version":[{"id":111576,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/43037\/revisions\/111576"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/43038"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43037"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}