{"id":45090,"date":"2018-07-09T18:34:45","date_gmt":"2018-07-09T12:34:45","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=45090"},"modified":"2022-01-14T21:21:40","modified_gmt":"2022-01-14T15:21:40","slug":"%d0%b4%d0%b0%d1%82%d1%87%d0%b8%d0%ba-%d1%82%d0%b5%d0%bc%d0%bf%d0%b5%d1%80%d0%b0%d1%82%d1%83%d1%80%d1%8b-%d0%bd%d0%b0-1n4148-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=45090","title":{"rendered":"\u0414\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430 1N4148 (Arduino)"},"content":{"rendered":"<blockquote><p><img loading=\"lazy\" decoding=\"async\" class=\"size-thumbnail wp-image-45091 alignright\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/1N4148-200x193.jpg\" alt=\"\" width=\"200\" height=\"193\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/1N4148-200x193.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/1N4148.jpg 312w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u041a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u044b\u0439 \u0434\u0438\u043e\u0434 \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 &#8212; \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a, \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u043e\u043c \u0434\u0438\u043e\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0438\u043e\u0434\u043e\u0432 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e \u22122 \u043c\u0412\/\u00b0\u0421 (\u0442. \u0435. \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f).<\/p>\n<p>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0442 -30 \u0434\u043e 120\u00a0\u00ba\u0421.<\/p><\/blockquote>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430, \u043d\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0442\u0430 Arduino Nano (UNO), \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u044b\u0439 \u0434\u0438\u043e\u0434 1N4148.<\/p>\n<p>\u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 ATmega \u0432 Arduino \u0438\u043c\u0435\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0435 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b (\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b), \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c. \u0412 \u0441\u043a\u0435\u0442\u0447\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0440\u0435\u0436\u0438\u043c \u0438 \u0434\u0438\u043e\u0434 \u043f\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f 5 \u0412 \u0447\u0435\u0440\u0435\u0437 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043f\u043e\u0434\u0442\u044f\u0433\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 20 \u043a\u041e\u043c, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u0436\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u044f\u043c\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0434\u0438\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a\u00a0 \u0434\u0438\u043e\u0434\u044b \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0443\u0441\u043d\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b \u0438\u043b\u0438 \u043b\u0435\u0434 \u0441 \u0442\u0430\u043b\u043e\u0439 \u0432\u043e\u0434\u043e\u0439 \u0434\u043b\u044f \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0438 \u043f\u043e 0 \u0433\u0440. \u0426\u0435\u043b\u044c\u0441\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0443 \u043f\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435 \u043a\u0438\u043f\u044f\u0449\u0435\u0439 \u0432\u043e\u0434\u044b.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e, \u0438\u0437\u043c\u0435\u0440\u0438\u0432 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0443\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0440\u0442\u0443\u0442\u043d\u044b\u043c \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u043c \u0433\u0440\u0430\u0434\u0443\u0441\u043d\u0438\u043a\u043e\u043c (\u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c 0,1\u00ba\u0421), \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u0435\u0435 \u0432 \u0441\u043a\u0435\u0442\u0447\u0435 (\u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043a\u0435\u0442\u0447, \u0430 \u043f\u043e\u0442\u043e\u043c \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u0430\u0442\u044c), \u0430 \u0442\u0430\u043a \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u043b \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435 (\u0441\u043c.\u043c\u043e\u043d\u0438\u0442\u043e\u0440 \u043f\u043e\u0440\u0442\u0430).\u00a0 \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e (\u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e) \u0434\u0438\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d \u0432 \u043b\u0435\u0434 \u0441 \u0442\u0430\u043b\u043e\u0439 \u0432\u043e\u0434\u043e\u0439 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0431\u044b\u043b\u0438 \u043e\u043a\u043e\u043b\u043e \u043d\u0443\u043b\u044f \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.<\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u043e\u0434\u043e\u0432 1N4148, \u044f \u0443\u0431\u0435\u0434\u0438\u043b\u0441\u044f, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u043e\u0442 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u0438\u043e\u0434\u0430 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 0,5\u00a0\u00ba\u0421, \u043d\u043e \u0432\u0441\u0435 \u0434\u0438\u043e\u0434\u044b \u0431\u044b\u043b\u0438 \u0441 \u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u0440\u0442\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u043e\u0438 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0412\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-45092 size-full\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/732456875342693487.png\" alt=\"\" width=\"528\" height=\"438\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/732456875342693487.png 528w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/732456875342693487-200x166.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/732456875342693487-500x415.png 500w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\">#include &lt;LiquidCrystal.h&gt;            \r\nLiquidCrystal lcd(<span style=\"color: #d8fa3c;\">7<\/span>, <span style=\"color: #d8fa3c;\">8<\/span>, <span style=\"color: #d8fa3c;\">9<\/span>, <span style=\"color: #d8fa3c;\">10<\/span>, <span style=\"color: #d8fa3c;\">11<\/span>, <span style=\"color: #d8fa3c;\">12<\/span>);<span style=\"color: #aeaeae;\">\/\/ RS,E,D4,D5,D6,D7<\/span>\r\n\r\n<span style=\"color: #8da6ce;\">int<\/span> n <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">30<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u043a\u043e\u043b-\u0432\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <\/span>\r\n<span style=\"color: #8da6ce;\">int<\/span> t; <span style=\"color: #aeaeae;\">\/\/ 0,022 \u043c\u0412 \u043d\u0430 1 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438\u043b\u0438 2 \u0435\u0434.\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u04105 \u043d\u0430 1 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f)<\/span>\r\nconst float t0 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">26.0<\/span>; <span style=\"color: #aeaeae;\">\/\/ \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430<\/span>\r\nconst float t0_analog <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">545<\/span>; <span style=\"color: #aeaeae;\">\/* \u041f\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0434\u0443\u0441\u043d\u0438\u043a\u0430\r\n\u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b t0, \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\r\nt0_analog \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 \u043f\u043e\u0440\u0442\u0430 \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0433\u043e *\/<\/span>\r\nfloat t_sum,t_iz,t_iz_analog,t_analog;\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> setup() {\r\n  analogReference(INTERNAL);<span style=\"color: #aeaeae;\">\/\/ \u043e\u043f\u043e\u0440\u043d\u043e\u0435 1,1 \u0412 <\/span>\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(A5, INPUT_PULLUP);\r\n  Serial.begin(<span style=\"color: #d8fa3c;\">9600<\/span>); \r\n}\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> loop() {  \r\n \r\n  lcd.<span style=\"color: #8da6ce;\">clear<\/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;\">\"temp = \"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(t_iz,<span style=\"color: #d8fa3c;\">1<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" C \"<\/span>);\r\n  Serial.println(t_analog,<span style=\"color: #d8fa3c;\">0<\/span>);\r\n  t_sum <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n  <span style=\"color: #fbde2d;\">for<\/span> (<span style=\"color: #8da6ce;\">int<\/span> i <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>; i &lt; n; i<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>) {\r\n    t <span style=\"color: #fbde2d;\">=<\/span> analogRead(A5);<span style=\"color: #aeaeae;\">\/\/ 545 \u043f\u0440\u0438 26 \u0433\u0440<\/span>\r\n    t_sum <span style=\"color: #fbde2d;\">=<\/span> t_sum <span style=\"color: #fbde2d;\">+<\/span> t; \r\n    delay(<span style=\"color: #d8fa3c;\">33<\/span>);<span style=\"color: #aeaeae;\">\/\/ \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f 999 \u043c\u0441<\/span>\r\n  }\r\n\r\n  t_analog <span style=\"color: #fbde2d;\">=<\/span> t_sum <span style=\"color: #fbde2d;\">\/<\/span> n;<span style=\"color: #aeaeae;\">\/\/ \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/span>\r\n  t_iz_analog <span style=\"color: #fbde2d;\">=<\/span> (t_analog<span style=\"color: #fbde2d;\">-<\/span>t0_analog) <span style=\"color: #fbde2d;\">\/<\/span> <span style=\"color: #d8fa3c;\">2<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f \u043e\u0442 t0<\/span>\r\n  t_iz <span style=\"color: #fbde2d;\">=<\/span> t0 <span style=\"color: #fbde2d;\">-<\/span> t_iz_analog;<span style=\"color: #aeaeae;\">\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/span>\r\n}\r\n<\/pre>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-45093 size-full\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/25632724698-e1531139652876.png\" alt=\"\" width=\"374\" height=\"155\" \/> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-45094 \" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/74365784368976324.png\" alt=\"\" width=\"427\" height=\"249\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/74365784368976324.png 612w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/74365784368976324-200x117.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/74365784368976324-500x292.png 500w\" sizes=\"auto, (max-width: 427px) 100vw, 427px\" \/><\/p>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440, \u0441\u0445\u0435\u043c\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-45097 size-medium\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/718261782369872-500x400.png\" alt=\"\" width=\"500\" height=\"400\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/718261782369872-500x400.png 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/718261782369872-200x160.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/718261782369872.png 527w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0435 13 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043b\u043e\u0433. \u043d\u043e\u043b\u044c. \u0422\u0430\u043a \u0436\u0435 \u0432 \u043a\u043e\u0434 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0433\u0438\u0441\u0442\u0435\u0440\u0435\u0437\u0438\u0441 \u0432 0,2 \u0433\u0440\u0430\u0434\u0443\u0441\u0430.<\/p>\n<pre style=\"background: #0c1021; color: #f8f8f8;\">#include &lt;LiquidCrystal.h&gt;            \r\nLiquidCrystal lcd(<span style=\"color: #d8fa3c;\">7<\/span>, <span style=\"color: #d8fa3c;\">8<\/span>, <span style=\"color: #d8fa3c;\">9<\/span>, <span style=\"color: #d8fa3c;\">10<\/span>, <span style=\"color: #d8fa3c;\">11<\/span>, <span style=\"color: #d8fa3c;\">12<\/span>);<span style=\"color: #aeaeae;\">\/\/ RS,E,D4,D5,D6,D7<\/span>\r\n\r\n<span style=\"color: #8da6ce;\">int<\/span> n <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">30<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u043a\u043e\u043b-\u0432\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <\/span>\r\n<span style=\"color: #8da6ce;\">int<\/span> t; <span style=\"color: #aeaeae;\">\/\/ 0,022 \u043c\u0412 \u043d\u0430 1 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438\u043b\u0438 2 \u0435\u0434.\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u04105 \u043d\u0430 1 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f)<\/span>\r\nconst float t0 <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">26.0<\/span>; <span style=\"color: #aeaeae;\">\/\/ \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430<\/span>\r\nconst float t0_analog <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">545<\/span>; <span style=\"color: #aeaeae;\">\/* \u041f\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c \u044d\u0442\u0430\u043b\u043e\u043d\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0434\u0443\u0441\u043d\u0438\u043a\u0430\r\n\u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b t0, \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\r\nt0_analog \u0432 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 \u043f\u043e\u0440\u0442\u0430 \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0433\u043e *\/<\/span>\r\nfloat t_sum,t_iz,t_iz_analog,t_analog;\r\n<span style=\"color: #8da6ce;\">int<\/span> kn,t_reg <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">25<\/span>;\r\nconst float g <span style=\"color: #fbde2d;\">= <\/span><span style=\"color: #d8fa3c;\">0.2<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u0433\u0438\u0441\u0442\u0435\u0440\u0435\u0437\u0438\u0441<\/span>\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> setup() {\r\n  analogReference(INTERNAL);<span style=\"color: #aeaeae;\">\/\/ \u043e\u043f\u043e\u0440\u043d\u043e\u0435 1,1 \u0412 <\/span>\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(A5,INPUT_PULLUP);\r\n  pinMode(<span style=\"color: #d8fa3c;\">5<\/span>,INPUT_PULLUP);\r\n  pinMode(<span style=\"color: #d8fa3c;\">4<\/span>,INPUT_PULLUP);\r\n  pinMode(<span style=\"color: #d8fa3c;\">13<\/span>,OUTPUT);\r\n  Serial.begin(<span style=\"color: #d8fa3c;\">9600<\/span>); \r\n}\r\n\r\n<span style=\"color: #8da6ce;\">void<\/span> loop() {  \r\n \r\n  lcd.<span style=\"color: #8da6ce;\">clear<\/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;\">\"temp = \"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(t_iz,<span style=\"color: #d8fa3c;\">1<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" C \"<\/span>);\r\n  Serial.println(t_analog,<span style=\"color: #d8fa3c;\">0<\/span>);\r\n    \r\n  <span style=\"color: #fbde2d;\">if<\/span>(digitalRead(<span style=\"color: #d8fa3c;\">5<\/span>) <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>){t_reg<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>;}\r\n  <span style=\"color: #fbde2d;\">if<\/span>(digitalRead(<span style=\"color: #d8fa3c;\">4<\/span>) <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>){t_reg<span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #fbde2d;\">-<\/span>;}\r\n  <span style=\"color: #fbde2d;\">if<\/span>(t_reg &lt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">30<\/span>){t_reg <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #fbde2d;\">-<\/span><span style=\"color: #d8fa3c;\">30<\/span>;}\r\n  <span style=\"color: #fbde2d;\">if<\/span>(t_reg &gt;<span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">120<\/span>){t_reg <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">120<\/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;\">\"reg = \"<\/span>);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(t_reg);\r\n  lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" C \"<\/span>);\r\n  \r\n  <span style=\"color: #fbde2d;\">if<\/span>(t_reg &gt;<span style=\"color: #fbde2d;\">=<\/span> t_iz <span style=\"color: #fbde2d;\">+ <\/span>g){digitalWrite(<span style=\"color: #d8fa3c;\">13<\/span>,HIGH);}\r\n  <span style=\"color: #fbde2d;\">if<\/span>(t_reg &lt;<span style=\"color: #fbde2d;\">=<\/span> t_iz <span style=\"color: #fbde2d;\">- <\/span>g){digitalWrite(<span style=\"color: #d8fa3c;\">13<\/span>,LOW);}\r\n  <span style=\"color: #fbde2d;\">if<\/span>(digitalRead(<span style=\"color: #d8fa3c;\">13<\/span>) <span style=\"color: #fbde2d;\">=<\/span><span style=\"color: #fbde2d;\">= <\/span>HIGH){lcd.setCursor(<span style=\"color: #d8fa3c;\">14<\/span>,<span style=\"color: #d8fa3c;\">1<\/span>);lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\"*\"<\/span>);}\r\n  <span style=\"color: #fbde2d;\">else<\/span>{lcd.setCursor(<span style=\"color: #d8fa3c;\">14<\/span>,<span style=\"color: #d8fa3c;\">1<\/span>);lcd.<span style=\"color: #8da6ce;\">print<\/span>(<span style=\"color: #61ce3c;\">\" \"<\/span>);}\r\n \r\n  t_sum <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>;\r\n  <span style=\"color: #fbde2d;\">for<\/span> (<span style=\"color: #8da6ce;\">int<\/span> i <span style=\"color: #fbde2d;\">=<\/span> <span style=\"color: #d8fa3c;\">0<\/span>; i &lt; n; i<span style=\"color: #fbde2d;\">+<\/span><span style=\"color: #fbde2d;\">+<\/span>) {\r\n    t <span style=\"color: #fbde2d;\">=<\/span> analogRead(A5);<span style=\"color: #aeaeae;\">\/\/ 545 \u043f\u0440\u0438 26 \u0433\u0440<\/span>\r\n    t_sum <span style=\"color: #fbde2d;\">=<\/span> t_sum <span style=\"color: #fbde2d;\">+<\/span> t; \r\n    delay(<span style=\"color: #d8fa3c;\">33<\/span>);<span style=\"color: #aeaeae;\">\/\/ \u043e\u0431\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f 999 \u043c\u0441<\/span>\r\n  }\r\n\r\n  t_analog <span style=\"color: #fbde2d;\">=<\/span> t_sum <span style=\"color: #fbde2d;\">\/<\/span> n;<span style=\"color: #aeaeae;\">\/\/ \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/span>\r\n  t_iz_analog <span style=\"color: #fbde2d;\">=<\/span> (t_analog<span style=\"color: #fbde2d;\">-<\/span>t0_analog) <span style=\"color: #fbde2d;\">\/<\/span> <span style=\"color: #d8fa3c;\">2<\/span>;<span style=\"color: #aeaeae;\">\/\/ \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0433\u0440.\u0426\u0435\u043b\u044c\u0441\u0438\u044f \u043e\u0442 t0<\/span>\r\n  t_iz <span style=\"color: #fbde2d;\">=<\/span> t0 <span style=\"color: #fbde2d;\">-<\/span> t_iz_analog;<span style=\"color: #aeaeae;\">\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/span>\r\n}\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-thumbnail wp-image-45107\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/76586587-200x74.png\" alt=\"\" width=\"200\" height=\"74\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/76586587-200x74.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/76586587.png 399w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u041a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u044b\u0439 \u0434\u0438\u043e\u0434 \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 &#8212; \u044d\u0442\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a, \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u043e\u043c \u0434\u0438\u043e\u0434\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, \u043f\u0440\u0438\u0447\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0438\u043e\u0434\u043e\u0432 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e \u22122 \u043c\u0412\/\u00b0\u0421 (\u0442. \u0435. \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f). \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0440\u0435\u043c\u043d\u0438\u0435\u0432\u043e\u0433\u043e \u0434\u0438\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0442 -30 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":45092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-45090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":14564,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45090","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=45090"}],"version-history":[{"count":5,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45090\/revisions"}],"predecessor-version":[{"id":111567,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45090\/revisions\/111567"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/45092"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45090"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}