{"id":315639,"date":"2020-12-28T09:00:15","date_gmt":"2020-12-28T09:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=315639"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=315639","title":{"rendered":"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439. \u0427\u0430\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u0430\u044f \u2014 Software"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o8\/ix\/yo\/o8ixyoorr_mizb7swpehrdplebu.jpeg\" alt=\"\u041a\u0414\u041f\u0412\"><\/div>\n<p>  &lt;irony&gt;<br \/>  \u041d\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0438 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430\u2026 \u041d\u043e \u0437\u0430\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c!<br \/>  &lt;\/irony&gt;<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/485696\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0447\u0430\u0441\u044b! \u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 \u0447\u0430\u0441\u044b. \u0411\u0435\u0437 \u043a\u043d\u043e\u043f\u043e\u043a, \u043d\u0430 ESP8266, \u043d\u0430 NodeMCU \u0438 Lua. \u041a\u043e\u043c\u0443 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u2014 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041a\u0443\u0441\u043e\u0447\u0435\u043a hardware<\/h3>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 (\u0438\u043b\u0438 \u0448\u0435\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b). \u0422\u0430\u043a \u043a\u0430\u043a \u0447\u0430\u0441\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0435\u043d\u043d\u044b\u043c\u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u043e \u0434\u0432\u0430 \u0442\u0440\u0435\u0445\u0434\u044e\u0439\u043c\u043e\u0432\u044b\u0445 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430. \u0412 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0441 \u043e\u0431\u0449\u0438\u043c \u0430\u043d\u043e\u0434\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b master-\u043f\u043b\u0430\u0442\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u0434\u043b\u044f slave-\u043f\u043b\u0430\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043a\u043e\u0432\u043e\u0439 \u0440\u0430\u0437\u044a\u0451\u043c \u0438 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b. \u0421\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432\u043c\u0435\u0441\u0442\u0435 \u0438 \u0432\u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c! <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hv\/iq\/-m\/hviq-me7tarzoypqcqgri2rkalm.jpeg\"><\/div>\n<h3>\u0421\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441 NodeMCU<\/h3>\n<p>  \u041f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 arduino-\u0432\u044b\u0445 \u0441\u043a\u0435\u0442\u0447\u0430\u0445 \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u043b\u0438\u0433\u0438\u044f, \u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0430 bare-metal \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043f\u043e\u0434 ESP8266 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u044d\u0442\u043e \u044f\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440. \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u044b\u0431\u043e\u0440 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0430\u043b \u043d\u0430 NodeMCU \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0439 \u044f\u0437\u044b\u043a lua. \u0412\u043a\u0440\u0430\u0442\u0446\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <a href=\"https:\/\/nodemcu.readthedocs.io\/en\/master\/\" rel=\"nofollow\">NodeMCU<\/a> \u2014 \u044d\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 lua, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b. NodeMCU \u2014 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0431\u0448\u0438\u0440\u043d\u043e\u0439 \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 NodeMCU \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u043c\u0438 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0432\u0435\u0440\u0445 WiFi (HTTP, MQTT, JSON, CoAP), \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439, \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432, \u0441 \u0434\u0438\u0441\u043f\u043b\u0435\u044f\u043c\u0438, \u0438 \u0434\u0430\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 FatFS. <\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u043f\u043e\u0434 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/nodemcu-build.com\/\" rel=\"nofollow\">www.nodemcu-build.com<\/a>, \u0432\u0432\u043e\u0434\u0438\u043c \u0441\u0432\u043e\u044e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443, \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0436\u043c\u0435\u043c Start your build.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Shit happens<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041c\u043d\u0435 \u043d\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e \u00ab\u043f\u043e\u0432\u0435\u0437\u043b\u043e\u00bb \u0438 \u0432\u0441\u0435 \u043c\u043e\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 ESP-07 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0441 \u0444\u043b\u0435\u0448\u0435\u043c 512\u043a\u0411 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443. \u0425\u043e\u0442\u044f \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u0430 \u0438 \u0444\u043e\u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 1\u041c\u0431. \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u044f \u0446\u0435\u043b\u044b\u0439 \u0432\u0435\u0447\u0435\u0440 \u0438\u0441\u043a\u0430\u043b \u043f\u0440\u0438\u0447\u0438\u043d\u0443, \u043f\u043e\u0447\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043b\u0438 \u043d\u0435 \u0448\u044c\u0435\u0442\u0441\u044f \u0432\u043e\u0432\u0441\u0435 \u0438\u043b\u0438 \u0448\u043b\u0451\u0442 \u043c\u0443\u0441\u043e\u0440 \u0432 \u0421\u041e\u041c-\u043f\u043e\u0440\u0442 \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u0438\u0441\u0442\u043e\u0432\u043e \u043c\u0438\u0433\u0430\u044f \u0441\u0438\u043d\u0438\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c master branch NodeMCU \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442 1 \u041c\u0431 \u0444\u043b\u0435\u0448\u0430. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u0447\u0438\u043a\u043e\u0432, \u043a\u0430\u043a \u044f \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0440\u044f\u0434\u043e\u043c \u0441 branch-\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 1.5.4.1 \u2014 \u044d\u0442\u043e \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 512\u043a\u0411.  <\/div>\n<\/p><\/div>\n<p>  \u0414\u043b\u044f \u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u0435\u0439:<br \/>   wifi \u2014 \u043e\u043a\u043d\u043e \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440<br \/>   enduser_setup \u2014 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 WiFi<br \/>   file \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0443\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<br \/>   gpio \u2014 \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043d\u043e\u0436\u043a\u0430\u043c\u0438<br \/>   net \u2014 \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430<br \/>   rtctime \u2014 \u0447\u0430\u0441\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<br \/>   sntp \u2014 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0430\u0441\u043e\u0432 \u043f\u043e \u0441\u0435\u0442\u0438, \u043a\u043d\u043e\u043f\u043e\u043a \u0442\u043e \u043d\u0435\u0442<br \/>   spi \u2014 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f MAX7219 <br \/>   tmr \u2014 \u0442\u0430\u0439\u043c\u0435\u0440\u044b <\/p>\n<p>  \u041e\u0442\u043c\u0435\u0442\u0438\u043b\u0438, \u043d\u0430\u0436\u0430\u043b\u0438 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0438\u043d\u044e\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0436\u0434\u0435\u043c \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442, \u043f\u043e\u043a\u0430 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 \u0443\u043f\u0430\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0434\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430, \u043a\u0430\u043a \u0438 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f lua-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f UART. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 USB-to-UART (3.3V!) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u044a\u0451\u043c J3 \u2014 UART. \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c CH340. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435 \u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c (\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u044b) \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 USB \u043d\u0430 \u043f\u043b\u0430\u0442\u0435. \u0423\u0434\u043e\u0431\u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0447\u0430\u0441\u0442\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0440\u0435\u0436\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u043e \u0444\u043b\u0435\u0448 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0443 J4. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c UART \u2014 115200 \u0431\u043e\u0434, \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0421\u041e\u041c \u043f\u043e\u0440\u0442\u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043d\u0430 \u0432\u0430\u0441.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/github.com\/marcelstoer\/nodemcu-pyflasher\" rel=\"nofollow\">NodeMCU-PyFlasher<\/a>. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043d\u0430 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0430\u043a \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f <a href=\"https:\/\/github.com\/nodemcu\/nodemcu-flasher\" rel=\"nofollow\">NodeMCU-Flasher<\/a>, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 NodeMCU-Flasher \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u043b\u0447\u0430 \u0433\u043b\u043e\u0445\u043d\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u0445 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u043f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043d\u0430 NodeMCU \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 ESP8266 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043b\u0435\u0447\u0438\u0442\u0441\u044f \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0448\u0438\u0432\u043a\u043e\u0439 \u0444\u0430\u0439\u043b\u0430 <a href=\"https:\/\/github.com\/espressif\/esp8266_at\/tree\/master\/bin\" rel=\"nofollow\">esp_init_data_default.bin<\/a> \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 0x7C000 \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0433\u0430\u043b\u043e\u0447\u043a\u0438 Erase Chip \u0432 NodeMCU-PyFlasher.  <\/div>\n<\/p><\/div>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0437\u0430\u043b\u0438\u0432\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ha\/bz\/0w\/habz0wqbr_6hbfzdxcap5ianxwu.png\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043c\u044b\u0447\u043a\u0443 J4 \u043c\u043e\u0436\u043d\u043e \u0441\u043d\u044f\u0442\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0443 \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 <a href=\"https:\/\/github.com\/4refr0nt\/ESPlorer\" rel=\"nofollow\">ESPlorer<\/a>. \u042f \u043d\u0435 \u043f\u0440\u0435\u0441\u043b\u0435\u0434\u0443\u044e \u0446\u0435\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0443\u0440\u0441 \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0430 lua, \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0430 \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445. \u041b\u0438\u0447\u043d\u043e \u043e\u0442 \u0441\u0435\u0431\u044f \u043c\u043e\u0433\u0443 \u0434\u0430\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044e \u043d\u0430 \u0431\u043b\u043e\u0433 <a href=\"https:\/\/blog.avislab.com\/category\/esp8266\/\" rel=\"nofollow\">avislab<\/a> \u2014 \u0442\u0430\u043c \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0446\u0435\u043b\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0441\u0432\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u0430\u0437\u043e\u0432 \u0434\u043e \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u043c\u0438 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430\u043c\u0438. <br \/>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 (\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0432\u0440\u0435\u043c\u044f!) \u0447\u0430\u0441\u043e\u0432, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0445 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043a \u0441\u0435\u0442\u0438 WiFi. \u0427\u0430\u0441\u0438\u043a\u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u043e, \u043d\u0435 \u0441\u0431\u043e\u0438\u0442, \u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c, \u043f\u043e\u043b\u0435\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c. <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 MAX7219 &#8212; max7219.lua<\/b>                         <\/p>\n<div class=\"spoiler_text\">  <\/p>\n<pre><code class=\"lua\">local spi_index = 1; local cs_pin = 3;  -- MAX7219 SPI Master Initialization function max7219_spi_init()     print('SPI init');          spi.setup(spi_index, spi.MASTER, spi.CPOL_LOW, spi.CPHA_LOW, 16, 80, spi.HALFDUPLEX);     gpio.mode(cs_pin, gpio.OUTPUT, gpio.PULLUP);     gpio.write(cs_pin, gpio.HIGH); end  -- MAX7219 Output function max7219_output(digit, value)     local data = digit*256 + value;     gpio.write(cs_pin, gpio.LOW);     spi.send(spi_index, data);     gpio.write(cs_pin, gpio.HIGH); end  -- MAX7219 set intensity function max7219_intensity(value)     local data = 0x0A00 + value;     gpio.write(cs_pin, gpio.LOW);     spi.send(spi_index, data);     gpio.write(cs_pin, gpio.HIGH); end  -- MAX7219 Initialization function max7219_init(digits, intensity)     print(string.format(&quot;MAX7219 init for %d digits&quot;, digits));          gpio.write(cs_pin, gpio.LOW);     -- Display test mode off     spi.send(spi_index, 0x0F00);     gpio.write(cs_pin, gpio.HIGH);          gpio.write(cs_pin, gpio.LOW);     -- Normal Operation mode     spi.send(spi_index, 0x0C01);     gpio.write(cs_pin, gpio.HIGH);          gpio.write(cs_pin, gpio.LOW);     -- Intensity duty cycle      -- [min 0x0A00 .. 0x0A0F max]     spi.send(spi_index, 0x0A00 + intensity);     gpio.write(cs_pin, gpio.HIGH);          gpio.write(cs_pin, gpio.LOW);     -- Decode-Mode      -- [0 - no decode, 1 - B-Code mode]     spi.send(spi_index, 0x09FF);     gpio.write(cs_pin, gpio.HIGH);          gpio.write(cs_pin, gpio.LOW);     -- Scan-Limit Register Format     spi.send(spi_index, 0x0B04);     gpio.write(cs_pin, gpio.HIGH);      -- Set blank as default     for d=0, digits do          max7219_output(d, 0x0F);     end end  collectgarbage(); <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">main c\u043a\u0440\u0438\u043f\u0442 &#8212; init.lua<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">local point = 0; local time_zone = 3; local sntp_cnt = 1; local cur_intensity = 0x0F;  function timer_do()     tm = rtctime.epoch2cal(rtctime.get());     if point == 0 then point = 1; else point = 0; end;     max7219_intensity(cur_intensity);     max7219_output(5, tm[&quot;min&quot;]%10);     max7219_output(4, tm[&quot;min&quot;]\/10);     max7219_output(2, tm[&quot;hour&quot;]%10 + (128*point));     max7219_output(1, tm[&quot;hour&quot;]\/10);      if tm[&quot;hour&quot;] &lt;= 7 then         -- from 0 to 8         cur_intensity = 0x01;     else          if tm[&quot;hour&quot;] &lt;= 18 then             -- from 8 to 19             cur_intensity = 0x0F;         else             if tm[&quot;hour&quot;] &lt;= 22 then                 -- from 19 to 22                 cur_intensity = 0x05;             else                 -- from 23 to 24                 cur_intensity = 0x01;               end         end     end end  function sntp_sync()     print (&quot;SNTP sync&quot;);     sntp.sync(&quot;194.54.161.214&quot;,         function(sec, usec, server, info)             rtctime.set(sec + 3600*time_zone)             tm = rtctime.epoch2cal(rtctime.get());             print(string.format(&quot;%04d\/%02d\/%02d %02d:%02d:%02d&quot;, tm[&quot;year&quot;], tm[&quot;mon&quot;], tm[&quot;day&quot;], tm[&quot;hour&quot;], tm[&quot;min&quot;], tm[&quot;sec&quot;]));             sntp_cnt = 4320;         end,         function(err, str)             print(&quot;Nope...&quot;)         end     ) end  function timer_sntp()     if sntp_cnt &gt; 0 then         sntp_cnt = sntp_cnt - 1;     else         if wifi.sta.status() == wifi.STA_GOTIP then              print(&quot;Connected to WiFi as:&quot; .. wifi.sta.getip());             sntp_cnt = 6;             sntp_sync();         else              print(&quot;No WiFi&quot;);          end;     end end  require(&quot;max7219&quot;); max7219_spi_init(); max7219_init(5, cur_intensity);  rtctime.set(1577872800 + 3600*time_zone); tm = rtctime.epoch2cal(rtctime.get()); print(string.format(&quot;%02d:%02d:%02d&quot;, tm[&quot;hour&quot;], tm[&quot;min&quot;], tm[&quot;sec&quot;]));  enduser_setup.start(   function()     print(&quot;Connected to WiFi as:&quot; .. wifi.sta.getip())     sntp_sync();   end,   function(err, str)     print(&quot;enduser_setup: Err #&quot; .. err .. &quot;: &quot; .. str)   end );  local mytimer = tmr.create(); mytimer:register(500, tmr.ALARM_AUTO, timer_do); mytimer:start()  local sntp_timer = tmr.create(); sntp_timer:register(10000, tmr.ALARM_AUTO, timer_sntp); sntp_timer:start()  collectgarbage(); <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0424\u0430\u0439\u043b \u0434\u043b\u044f \u0448\u0430\u0440\u0438\u043d\u0433\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 enduser_setup &#8212; enduser_setup.lua<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">local p = {} p.wifi_ssid=&quot;ssid&quot; p.wifi_password=&quot;password&quot; -- your own parameters: p.utc_zone=&quot;xxx&quot; return p <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412\u043e \u0444\u043b\u0435\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 enduser_setup.html \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 WiFi. <br \/>  \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0447\u0430\u0441\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u043c\u0438. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 enduser_setup \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f WiFi-\u0442\u043e\u0447\u043a\u0430 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c SetupGaget_xxx.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2z\/cg\/rn\/2zcgrnv1wlxzfiesdveyfhfxksg.png\"><\/div>\n<p>  \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443-\u043b\u0438\u0431\u043e \u0430\u0434\u0440\u0435\u0441\u0443 (\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e 192.168.4.1) \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0441\u0435\u0442\u044f\u043c. <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/h8\/3m\/5c\/h83m5ct0bb_ary3wxmxhgk9tx-e.png\"><\/div>\n<p>  \u0422\u0430\u043a\u0430\u044f \u0441\u0435\u0431\u0435 landing-page, \u043a\u0443\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438 \u0438 \u043f\u0430\u0440\u043e\u043b\u044c. \u041c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0440\u0430\u0434\u043e\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 WiFi-\u0442\u043e\u0447\u043a\u0443. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0447\u0430\u0441\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u0430.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rd\/wo\/n_\/rdwon_z3chnjfxa0gtjdiwi_fq8.png\"><\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443 \u0447\u0430\u0441\u044b \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 SNTP \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0442\u0438\u0445\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0435, \u043f\u043e\u043c\u0438\u0433\u0438\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u0430. <br \/>  \u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u044b\u0439 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 512\u043a\u0411 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438, \u043a\u0430\u043a \u0432 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435, \u0435\u0441\u043b\u0438 \u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c master branch \u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 <a href=\"https:\/\/nodemcu.readthedocs.io\/en\/master\/modules\/cron\/\" rel=\"nofollow\">cron<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0448\u0435 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">cron<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">cron.schedule(&quot;0 *\/12 * * *&quot;, function(e)   print(&quot;Every 12 hours&quot;);   sntp_sync(); end) <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-b\/ix\/io\/-bixiorzuedsolcuw3lc81o9ei0.jpeg\"><\/div>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u0444\u043e\u0442\u043e, \u0441\u044a\u0435\u043c\u043a\u0430 \u044f\u0440\u043a\u0438\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u0445 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u0439 \u0435\u0449\u0435 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u043c \u0444\u0440\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c. \u0412 \u0436\u0438\u0437\u043d\u0438 \u0447\u0430\u0441\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u044f\u0440\u043a\u0438\u043c\u0438, \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c\u0438 \u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \ud83d\ude42<\/p>\n<h3>\u0427\u0442\u043e \u0435\u0449\u0435?..<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0434\u0435\u044f\u0445. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e lua-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u0434 NodeMCU \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0437\u0430 \u0447\u0430\u0441 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0435\/\u043d\u0430\u0441\u0442\u0435\u043d\u043d\u044b\u0435 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 (\u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u0444\u0430\u043a\u0430\u043f\u044b) \u0438\u043b\u0438 \u043e\u0442\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043e \u0447\u0435\u0433\u043e-\u0442\u043e, \u0431\u0443\u0434\u044c \u0434\u043e \u0434\u0435\u0434\u043b\u0430\u0439\u043d \u0438\u043b\u0438 \u043e\u0442\u043f\u0443\u0441\u043a. \u0418\u043b\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043d\u0438 \u0431\u0435\u0437 \u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044c enduser_setup \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c. <br \/>  \u0412\u0442\u043e\u0440\u043e\u0439, \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043f\u043e\u0434\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043a \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442, \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432\u043e\u0437\u0434\u0443\u0445\u0430 \u043d\u0430 \u0443\u043b\u0438\u0446\u0435 \u0438\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0432\u0448\u0438\u0445 \u043e\u0442 \u043a\u043e\u0440\u043e\u043d\u0430\u0432\u0438\u0440\u0443\u0441\u0430 \u0438 \u043b\u044e\u0431\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. <br \/>  \u0412\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u043b\u0435\u0435\u043c \u0441 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u044e\u0431\u0443\u044e \u0438\u0437 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 esp8266 \u043f\u043e WiFi. \u0422\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 \u0432 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u0433\u0440\u0430\u0445 \u0438\u043b\u0438 \u043d\u0430 \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0448\u043a\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430. <\/p>\n<p>  \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0438 \u043a esp8266 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u0425\u043e\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0443\u0433\u043b\u0435\u043a\u0438\u0441\u043b\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u0432 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0438 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e \u0441\u043b\u0443\u0447\u0430\u044e \u0433\u0440\u044f\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u0430, \u044f \u0437\u0430\u043f\u0438\u043b\u0438\u043b \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0434\u043d\u0435\u0439 \u0434\u043e \u041d\u043e\u0432\u043e\u0433\u043e \u0413\u043e\u0434\u0430.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qn\/s3\/3n\/qns33ng7zsosiaoodp-ko17tuqi.jpeg\"><\/div>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1n\/bg\/eo\/1nbgeoe5lzxjrlkyt-muwvgn42o.png\"><\/div>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">NY \u0436\u0434\u0443\u043d<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">local time_zone = 3; local sntp_cnt = 1; local cur_intensity = 0x0F; local days = 189;  function print_days()     max7219_intensity(cur_intensity);     max7219_output(3, days%10);     max7219_output(2, (days%100)\/10);     max7219_output(1, days\/100);      if tm[&quot;hour&quot;] &lt;= 7 then         -- from 0 to 8         cur_intensity = 0x01;     else          if tm[&quot;hour&quot;] &lt;= 18 then             -- from 8 to 19             cur_intensity = 0x0F;         else             if tm[&quot;hour&quot;] &lt;= 22 then                 -- from 19 to 22                 cur_intensity = 0x05;             else                 -- from 23 to 24                 cur_intensity = 0x01;               end         end     end end  local dpm = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};  function days_till_ny()     tm = rtctime.epoch2cal(rtctime.get());     days = dpm[tm[&quot;mon&quot;]-1] - tm[&quot;day&quot;];     if (tm[&quot;year&quot;]%4) and (tm[&quot;mon&quot;]&lt;=2) then days = days - 1; end;      local month = tm[&quot;mon&quot;];     while(month &lt; 12)     do         days = days + dpm[month];         month = month + 1;     end;     print_days(); end  function sntp_sync()     if wifi.sta.status() == wifi.STA_GOTIP then          print(&quot;Connected to WiFi as:&quot; .. wifi.sta.getip());         print (&quot;SNTP sync&quot;);         sntp.sync(&quot;194.54.161.214&quot;,             function(sec, usec, server, info)                 rtctime.set(sec + 3600*time_zone)                 tm = rtctime.epoch2cal(rtctime.get());                 print(string.format(&quot;%04d\/%02d\/%02d %02d:%02d:%02d&quot;, tm[&quot;year&quot;], tm[&quot;mon&quot;], tm[&quot;day&quot;], tm[&quot;hour&quot;], tm[&quot;min&quot;], tm[&quot;sec&quot;]));                 days_till_ny();             end,             function(err, str)                 print(&quot;Nope...&quot;)             end     );     else          print(&quot;No WiFi&quot;);      end;     end;  require(&quot;max7219&quot;); max7219_spi_init(); max7219_init(3, cur_intensity);  rtctime.set(1577872800 + 3600*time_zone); tm = rtctime.epoch2cal(rtctime.get()); print(string.format(&quot;%02d:%02d:%02d&quot;, tm[&quot;hour&quot;], tm[&quot;min&quot;], tm[&quot;sec&quot;]));  enduser_setup.start(     function()         sntp_sync()     end,     function(err, str)         print(&quot;enduser_setup: Err #&quot; .. err .. &quot;: &quot; .. str)     end )  cron.schedule(&quot;0 *\/12 * * *&quot;, function(e)   print(&quot;Every 12 hours&quot;);   sntp_sync(); end)  collectgarbage(); <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0418\u0434\u0435\u0439, \u043a\u0430\u043a \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0445 \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u044f, \u0432\u0435\u043b\u0438\u043a\u043e\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438 \u0446\u0432\u0435\u0442\u043e\u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0442\u0430 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438. \u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f. <\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443 \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <br \/>  \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<br \/>  \u0418 \u0432\u0441\u0435\u0445 \u0441 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u043c\u0438 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u0430\u043c\u0438!<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/490074\/\"> https:\/\/habr.com\/ru\/post\/490074\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/o8\/ix\/yo\/o8ixyoorr_mizb7swpehrdplebu.jpeg\" alt=\"\u041a\u0414\u041f\u0412\"><\/div>\n<p>  &lt;irony&gt;<br \/>  \u041d\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0438 \u043f\u043e\u043b\u0443\u0433\u043e\u0434\u0430\u2026 \u041d\u043e \u0437\u0430\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c!<br \/>  &lt;\/irony&gt;<\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/habr.com\/ru\/post\/485696\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043f\u043b\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0447\u0430\u0441\u044b! \u0422\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u0435 \u0447\u0430\u0441\u044b. \u0411\u0435\u0437 \u043a\u043d\u043e\u043f\u043e\u043a, \u043d\u0430 ESP8266, \u043d\u0430 NodeMCU \u0438 Lua. \u041a\u043e\u043c\u0443 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u2014 \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-315639","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=315639"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315639\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}