{"id":67558,"date":"2019-11-20T10:22:42","date_gmt":"2019-11-20T04:22:42","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=67558"},"modified":"2022-01-09T14:11:35","modified_gmt":"2022-01-09T08:11:35","slug":"%d0%bf%d0%be%d0%b4%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8%d0%b5-lcd1602-2004-%d0%ba-esp8266-nodemcu","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=67558","title":{"rendered":"\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 LCD1602 (2004) \u043a ESP8266 NodeMCU"},"content":{"rendered":"<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f LCD1602 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 HD44780 \u043a \u043c\u043e\u0434\u0443\u043b\u044e ESP8266 NodeMCU \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f I2C \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u0431\u0430\u0437\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c PCF8574 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 1602 \u043a \u043f\u043b\u0430\u0442\u0435 ESP8266 NodeMCU \u0432\u0441\u0435\u0433\u043e \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0430\u043c SDA \u0438 SCL (D2 \u0438 D1).<\/p>\n<ul>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 GND \u043d\u0430 LCD &#8212; \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 GND \u043d\u0430 NodeMCU.<\/li>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043a\u043e\u043d\u0442\u0430\u043a\u0442 VCC \u043d\u0430 LCD &#8212; \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043a \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0443 VIN \u043d\u0430 NodeMCU. \u0412\u044b\u0432\u043e\u0434 VIN \u043d\u0430 NodeMCU \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c 5V \u043d\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c USB-\u043f\u043e\u0440\u0442\u0443.\u00a0\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c NodeMCU \u043a \u0447\u0435\u043c\u0443-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443, \u043a\u0440\u043e\u043c\u0435 USB, \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0430\u0447\u0438 5 \u0412 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439.<\/li>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 SDA \u043d\u0430 LCD &#8212; \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 D2 \u043d\u0430 NodeMCU.<\/li>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 SCL \u043d\u0430 LCD &#8212; \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043a \u0432\u044b\u0432\u043e\u0434\u0443 D1 \u043d\u0430 NodeMCU.<\/li>\n<\/ul>\n<blockquote><p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 VIN \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f 5 \u0412, \u0442\u0430\u043a \u043a \u0446\u0435\u043f\u0438 \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043e\u0442 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430 VIN \u0434\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0441\u0442\u043e\u0438\u0442 \u0434\u0438\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043e\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b \u043a\u043e\u043d\u0442\u0430\u043a\u0442 VIN \u0441\u043e \u0432\u0445\u043e\u0434\u043e\u043c \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/72646583963.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-67567\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/72646583963.png\" alt=\"\" width=\"531\" height=\"332\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/72646583963.png 645w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/72646583963-200x125.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/72646583963-500x312.png 500w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/a><\/p><\/blockquote>\n<p>\u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u044b ESP8266 NodeMCU \u0432 Arduino IDE \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 &#8212; <strong><a href=\"http:\/\/rcl-radio.ru\/?p=48790\">http:\/\/rcl-radio.ru\/?p=48790<\/a><\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u0441\u043a\u0435\u0442\u0447\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 &#8212; <strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/I2C-LCD-ESP8266-Library.zip\">I2C-LCD-ESP8266-Library<\/a><\/strong><\/p>\n<div id=\"marketWidget\"><\/div>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;Wire.h&gt; <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;LiquidCrystal_I2C.h&gt;<\/span>\r\nLiquidCrystal_I2C lcd<span style=\"color: #66cc66;\">(<\/span>0x27,<span style=\"color: #cc66cc;\">16<\/span>,<span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>;  <span style=\"color: #808080; font-style: italic;\">\/\/ \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u0439<\/span>\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>\r\n<span style=\"color: #66cc66;\">{<\/span>\r\n  lcd.<span style=\"color: #006600;\">init<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;                   \r\n  lcd.<span style=\"color: #006600;\">backlight<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0434\u0438\u0441\u043f\u043b\u0435\u044f<\/span>\r\n  lcd.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"  rcl-radio.ru  \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  lcd.<span style=\"color: #006600;\">setCursor<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  lcd.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"    LCD 1602    \"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">5000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  lcd.<span style=\"color: #006600;\">noBacklight<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0434\u0438\u0441\u043f\u043b\u0435\u044f<\/span>\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">5000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  lcd.<span style=\"color: #006600;\">backlight<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0434\u0438\u0441\u043f\u043b\u0435\u044f<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/09\/734862873.png\" \/><\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/547879048782.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-67571\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/547879048782.png\" alt=\"\" width=\"693\" height=\"354\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/547879048782.png 693w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/547879048782-200x102.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2019\/11\/547879048782-500x255.png 500w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f LCD1602 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 HD44780 \u043a \u043c\u043e\u0434\u0443\u043b\u044e ESP8266 NodeMCU \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f I2C \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u0431\u0430\u0437\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c PCF8574 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 1602 \u043a \u043f\u043b\u0430\u0442\u0435 ESP8266 NodeMCU \u0432\u0441\u0435\u0433\u043e \u043f\u043e \u0434\u0432\u0443\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0430\u043c SDA \u0438 SCL (D2 \u0438 D1). \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 GND \u043d\u0430 LCD &#8212; \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 GND \u043d\u0430 NodeMCU. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":67565,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-67558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":21575,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/67558","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=67558"}],"version-history":[{"count":11,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/67558\/revisions"}],"predecessor-version":[{"id":111312,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/67558\/revisions\/111312"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/67565"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67558"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}