﻿{"id":456,"date":"2018-03-01T21:37:17","date_gmt":"2018-03-01T18:37:17","guid":{"rendered":"http:\/\/allchina.a-lisa.org\/?p=456"},"modified":"2019-04-06T11:28:26","modified_gmt":"2019-04-06T08:28:26","slug":"%d1%83%d0%bf%d1%80%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d0%b5-%d1%81%d0%b2%d0%b5%d1%82%d0%be%d0%bc-esp8266","status":"publish","type":"post","link":"https:\/\/allchina.a-lisa.org\/?p=456","title":{"rendered":"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0442\u043e\u043c esp8266"},"content":{"rendered":"<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0440\u0438\u043a\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435. \u0418\u0434\u0435\u044f \u00ab\u0443\u043c\u043d\u043e\u0433\u043e\u00bb \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0441\u0432\u0435\u0442\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043d\u043e\u0432\u0430 \u0438, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0442\u0435\u043c, \u043a\u0442\u043e \u043d\u0430\u0447\u0430\u043b \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e\u0439 Arduino \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 IoT. \u0418 \u044f \u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0432 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0446\u0435\u043f\u0435\u0439, \u043c\u043e\u0442\u043e\u0440\u0447\u0438\u043a\u0430\u043c\u0438 \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0435, \u0447\u0442\u043e \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043e \u0432 \u043f\u043e\u0432\u0441\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438 \u0438, \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0430 \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0436\u0435\u0440\u0442\u0432\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0435\u0443\u0433\u043e\u0434\u0443 \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0443.<\/p>\n<p><!--more--><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 (\u0442.\u0435. \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u0435\u043d \u043d\u0430 \u0441\u0442\u0435\u043d\u0435) \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c \u0447\u0435\u0440\u0435\u0437 WiFi (\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0433\u043e. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443, \u044f \u043d\u0430\u043c\u0435\u0440\u0435\u0432\u0430\u043b\u0441\u044f \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0443\u044e\u0449\u0438\u0435 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u043e \u043e\u0442\u0437\u044b\u0432\u043e\u043c \u043d\u0430 \u0444\u043e\u0440\u0443\u043c\u0430\u0445 \u0438 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u0446\u0435\u043d\u044b \u043a \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0442\u0443\u0442 \u043d\u0435\u0443\u043c\u0435\u0441\u0442\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439, \u043d\u043e \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e, \u0442.\u043a. \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u0447\u0435\u043a \u0432 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u0435\u0445\u0430\u043d\u0438\u043a\u0435 \u0438 \u0431\u0443\u0434\u0443 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0437\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432.<\/p>\n<table>\n<tbody>\n<tr>\n<th>\u2116<\/th>\n<th>\u041d\u0410\u0418\u041c\u0415\u041d\u041e\u0412\u0410\u041d\u0418\u0415<\/th>\n<th>\u041e\u041f\u0418\u0421\u0410\u041d\u0418\u0415<\/th>\n<th>\u0426\u0415\u041d\u0410<\/th>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td><a href=\"http:\/\/www.hlktech.net\/product_detail.php?ProId=54\">HLK-PM01<\/a><\/td>\n<td>\u0410\u0434\u0430\u043f\u0442\u0435\u0440 220VAC \u0432 5VDC<\/td>\n<td>4,02\u20ac<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td><a href=\"http:\/\/www.fotek.com.hk\/solid\/SSR-1.htm\">SSR-40DA<\/a><\/td>\n<td>\u0422\u0432\u0435\u0440\u0434\u043e\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u043b\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u043e\u043c \u0432 \u0446\u0435\u043f\u0438<\/td>\n<td>3,35\u20ac<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td><a href=\"http:\/\/www.advanced-monolithic.com\/pdf\/ds1117.pdf\">AMS1117-3.3<\/a><\/td>\n<td>\u041f\u043e\u043d\u0438\u0436\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f c 5V \u043d\u0430 3V<\/td>\n<td>1,29\u20ac<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td><a href=\"http:\/\/www.esp8266.com\/wiki\/doku.php?id=esp8266-module-family#esp-01\">ESP8266-01<\/a><\/td>\n<td>\u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441 WiFi<\/td>\n<td>2,35\u20ac<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\" align=\"right\"><strong>\u0418\u0442\u043e\u0433\u043e:<\/strong><\/td>\n<td>11,01\u20ac<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c: \u0441\u0435\u0440\u0432\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442, Arduino Uno, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043b ESP, \u0440\u043e\u0443\u0442\u0435\u0440 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u043e\u0434\u0430, \u043a\u043b\u0435\u043c\u043c\u044b \u0438 \u0442.\u0434., \u0432\u0441\u0451 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u043a\u0443\u0441\u043e\u0432 \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>\u0426\u0435\u043d\u044b \u0432\u0437\u044f\u0442\u044b \u0438\u0437 Ebay, \u0433\u0434\u0435 \u044f \u0438\u0445 \u0438 \u043f\u043e\u043a\u0443\u043f\u0430\u043b.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 2\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-2.jpg\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 2\" width=\"690\" height=\"387\" \/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438 \u0441\u0445\u0435\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p><img decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 3\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-3.png\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 3\" \/><\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0441\u0445\u0435\u043c\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f. \u0412\u0441\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u0441\u044f \u043b\u0435\u0433\u043a\u043e, \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u043f\u0430\u0439\u043a\u0438. \u042d\u0434\u0430\u043a\u0438\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f. \u0412\u0441\u0451 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0430\u043c\u0438 \u0438 \u043a\u043b\u0435\u043c\u043c\u0430\u043c\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0440\u0435\u043b\u0435 \u043d\u0435 \u0432\u043b\u0435\u0437\u043b\u043e \u0432 \u0433\u043d\u0435\u0437\u0434\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f. \u0414\u0430, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432\u0441\u0451 \u044d\u0442\u043e \u0432 \u0441\u0442\u0435\u043d\u0443 \u0437\u0430 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043c\u043e\u0442\u0440\u0435\u043b\u043e\u0441\u044c \u044d\u0441\u0442\u0435\u0442\u0438\u0447\u043d\u043e. \u041d\u043e \u043a \u043c\u043e\u0435\u043c\u0443 \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0441\u0442\u0430 \u0432 \u0433\u043d\u0435\u0437\u0434\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043c\u0430\u043b\u043e \u0438 \u0440\u0435\u043b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432\u043b\u0435\u0437\u043b\u043e \u043d\u0438 \u0432\u0434\u043e\u043b\u044c, \u043d\u0438 \u043f\u043e\u043f\u0435\u0440\u0435\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 4\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-4.jpg\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 4\" width=\"690\" height=\"388\" \/><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044f \u0432\u044b\u043d\u0435\u0441 \u0440\u0435\u043b\u0435 \u0437\u0430 \u0433\u043d\u0435\u0437\u0434\u043e, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043a\u043e\u0440\u043e\u0431\u043a\u0443 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0441 \u0440\u043e\u0437\u0435\u0442\u043a\u043e\u0439 \u0447\u0442\u043e\u0431\u044b \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0436\u0435\u043b\u0435\u0437\u043e \u0432\u043d\u0443\u0442\u0440\u044c. \u041d\u043e \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e, \u0447\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438? \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 5\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-5.jpg\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 5\" width=\"690\" height=\"388\" \/><\/p>\n<p>\u0418\u0437\u043e\u043b\u0435\u043d\u0442\u0430 \u0441\u043f\u0430\u0441\u0451\u0442 \u043e\u0442 \u0443\u0434\u0430\u0440\u0430 \u0442\u043e\u043a\u043e\u043c\u2026 \u043d\u0430\u0434\u0435\u044e\u0441\u044c.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<p>\u0418 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u043a\u043e\u0434\u0430 \u0438 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0431\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 6\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-6.png\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 6\" width=\"690\" height=\"376\" \/><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044f \u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0443 \u0438 \u0441\u0432\u044f\u0437\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u043d\u0435\u0436\u0435\u043b\u0438 HTTP, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0439\u0434\u0435\u0442. \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0430 \u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430 1-1.5 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u0430 \u0441 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0438 \u043f\u043e\u0434\u043e\u0431\u0430\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u0447\u043d\u043e\u043c\u0443 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044e.<\/p>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 ESP8266-01<\/h2>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u2014 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Arduino. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Arduino IDE \u043c\u043e\u0436\u043d\u043e \u0441 <a href=\"https:\/\/github.com\/esp8266\/Arduino\">GitHub<\/a>. \u0422\u0430\u043c \u0436\u0435 \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c ESP \u043a \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0443, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043b\u0438\u0431\u043e USB to Serial \u0410\u0434\u0430\u043f\u0442\u0435\u0440 (\u0442\u0438\u043f\u0430 <a href=\"https:\/\/google.com\/search?q=FTDI+USB+Serial+3.3V\">FTDi<\/a>, <a href=\"https:\/\/google.com\/search?q=CH340+USB+Serial+3.3V\">CH340<\/a>, <a href=\"https:\/\/google.com\/search?q=FT232RL+USB+Serial+3.3V\">FT232RL<\/a>) \u043b\u0438\u0431\u043e \u043b\u044e\u0431\u0430\u044f Arduino \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 (\u0443 \u043c\u0435\u043d\u044f \u0431\u044b\u043b\u0430 Arduino Uno) \u0441 \u0432\u044b\u0445\u043e\u0434\u0430\u043c\u0438 RX \u0438 TX.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e ESP8266-01 \u043f\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442 3.3 \u0412\u043e\u043b\u044c\u0442\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044e Arduino, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 (\u0447\u0430\u0441\u0442\u043e) \u043f\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0442 5 \u0412\u043e\u043b\u044c\u0442, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u043d\u0430\u0447\u0435 \u0432\u0441\u0435 \u0441\u0433\u043e\u0440\u0438\u0442 \u043a \u0447\u0435\u0440\u0442\u044f\u043c. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043d\u0438\u0436\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0430: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c TX, RX \u0438 GND ESP \u043a RX, TX \u0438 GND \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\/Arduino \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Arduino IDE.<\/p>\n<p><strong>\u041f\u0430\u0440\u0430 \u043d\u044e\u0430\u043d\u0441\u043e\u0432 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 Arduino Uno:<\/strong><\/p>\n<ul>\n<li>\u041d\u0430 Uno \u0435\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0434\u043b\u044f 3.3\u0412, \u043d\u043e \u0435\u0433\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u041f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u043d\u0435\u043c\u0443 ESP, \u0432\u0441\u0435 \u0432\u0440\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0433\u043e\u0440\u044f\u0442, \u043d\u043e \u0441\u0432\u044f\u0437\u044c \u0441 COM \u043f\u043e\u0440\u0442\u043e\u043c \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430 3.3\u0412 \u0434\u043b\u044f ESP.<\/li>\n<li>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0443 UNO \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0441 ESP, \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e UNO \u043f\u0438\u0442\u0430\u043b\u0441\u044f \u043e\u0442 5\u0412, \u0430 ESP \u043e\u0442 3\u0412.<\/li>\n<\/ul>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 ESP8266-01, \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e ESP \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b \u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u043a GPIO0 \u0438 GPIO2 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f\u043c. \u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u0430\u0440\u0442\u0430 \u043e\u043d\u0438 \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0437\u0435\u043c\u043b\u0435\u043d\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043c\u0435\u0440\u0435\u0432\u0430\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u0441\u0442\u0430\u0440\u0442\u0435 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 <a href=\"https:\/\/github.com\/esp8266\/esp8266-wiki\/wiki\/Boot-Process#esp-boot-modes\">\u0442\u0443\u0442<\/a>. \u042f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u043b \u0438 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043b\u0435\u0433\u043a\u0430 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0442.\u043a. \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 ESP-01 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0432\u0442\u0443\u044e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u0438 2 \u043f\u0438\u043d\u0430 \u0438 \u0432 \u043c\u043e\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0431\u0430.<\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0438 \u0441\u0430\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f ESP:<\/p>\n<p><strong>\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u0434<\/strong><\/p>\n<pre><code>#include &lt;ESP8266WiFi.h&gt; #include &lt;WiFiClient.h&gt; #include &lt;ESP8266WebServer.h&gt; #include &lt;ESP8266mDNS.h&gt; #include &lt;ESP8266HTTPClient.h&gt; extern \"C\" { \/\/ \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 initVariant #include \"user_interface.h\" } const char* ssid = \"WIFISSID\"; \/\/ \u0418\u043c\u044f WiFi const char* password = \"***************\"; \/\/ \u041f\u0430\u0440\u043e\u043b\u044c WiFi const String self_token = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"; \/\/ \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0438 const String serv_token = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"; \/\/ \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u044f\u0437\u0438 const String name = \"IOT_lamp\"; \/\/ \u0438\u043c\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u0447\u0438\u0442\u0430\u0439 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438 const String serverIP = \"192.168.1.111\"; \/\/ \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 IP WEB \u0441\u0435\u0440\u0432\u0435\u0440\u0430 bool lamp_on = false; bool can_toggle = false; int button_state; ESP8266WebServer server(80); \/\/ \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 HTTPClient http; \/\/ \u0432\u0435\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 const int lamp = 2; \/\/ \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043b\u0435 \u0447\u0435\u0440\u0435\u0437 GPIO2 const int button = 0; \/\/ \"\u041b\u043e\u0432\u0438\u043c\" \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 GPIO0 \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0438\u043d\u0433\u0430 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438 void handleRoot() { server.send(200, \"text\/plain\", \"Hello! I am \" + name); } \/\/ \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 void handleNotFound(){ String message = \"not found\"; server.send(404, \"text\/plain\", message); } \/\/ \u0414\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u0435\u0442 void turnOnLamp(){ digitalWrite(lamp, LOW); lamp_on = true; } \/\/ \u0414\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u044c\u043c\u0430 void turnOffLamp(){ digitalWrite(lamp, HIGH); lamp_on = false; } \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u043a\u043b.\/\u0432\u044b\u043a\u043b. void sendServer(bool state){ http.begin(\"http:\/\/\"+serverIP+\"\/iapi\/setstate\"); String post = \"token=\"+self_token+\"&amp;state=\"+(state?\"on\":\"off\"); \/\/ \u041f\u043e \u0442\u043e\u043a\u0435\u043d\u0443 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e http.addHeader(\"Content-Type\", \"application\/x-www-form-urlencoded\"); int httpCode = http.POST(post); http.end(); } \/\/ \u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043b\u0430\u043c\u043f\u044b void toggleLamp(){ if(lamp_on == true) { turnOffLamp(); sendServer(false); } else { turnOnLamp(); sendServer(true); } } \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c void handleOn(){ String token = server.arg(\"token\"); if(serv_token != token) { String message = \"access denied\"; server.send(401, \"text\/plain\", message); return; } turnOnLamp(); String message = \"success\"; server.send(200, \"text\/plain\", message); } \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c void handleOff(){ String token = server.arg(\"token\"); if(serv_token != token) { String message = \"access denied\"; server.send(401, \"text\/plain\", message); return; } turnOffLamp(); String message = \"success\"; server.send(200, \"text\/plain\", message); } \/\/ \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c MAC \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 IP void initVariant() { uint8_t mac[<span class=\"hljs-number\" style=\"border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; margin: 0px; padding: 0px; color: #3387cc;\">6<\/span>] = {0x00, 0xA3, 0xA0, 0x1C, 0x8C, 0x45}; wifi_set_macaddr(STATION_IF, &amp;mac[<span class=\"hljs-number\" style=\"border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; margin: 0px; padding: 0px; color: #3387cc;\">0<\/span>]); } void setup(void){ pinMode(lamp, OUTPUT); pinMode(button, INPUT_PULLUP); \/\/ \u0412\u0430\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c INPUT_PULLUP turnOffLamp(); WiFi.hostname(name); WiFi.begin(ssid, password); \/\/ \u0416\u0434\u0435\u043c \u043f\u043e\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a WiFi while (WiFi.status() != WL_CONNECTED) { delay(500); } \/\/ \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b server.on(\"\/\", handleRoot); server.on(\"\/on\", HTTP_POST, handleOn); server.on(\"\/off\", HTTP_POST, handleOff); server.onNotFound(handleNotFound); \/\/ \u0421\u0442\u0430\u0440\u0442\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 server.begin(); } void loop(void){ server.handleClient(); \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f button_state = digitalRead(button); if (button_state == HIGH &amp;&amp; can_toggle) { toggleLamp(); can_toggle = false; delay(500); } else if(button_state == LOW){ can_toggle = true; } } <\/code><\/pre>\n<p><strong>\u041f\u0430\u0440\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u043f\u043e \u043a\u043e\u0434\u0443:<\/strong><\/p>\n<ul>\n<li>\u041e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0438\u043d GPIO0 \u043a\u0430\u043a pinMode(button, <strong>INPUT_PULLUP<\/strong>), \u0442.\u043a. \u0432 \u0441\u0445\u0435\u043c\u0435 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438. \u0410 \u0443 ESP \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u00ab\u0432\u0448\u0438\u0442\u044b\u0435\u00bb \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u0446\u0435\u043b\u0435\u0439.<\/li>\n<li>\u041f\u0440\u0438 \u043e\u0442\u043b\u043e\u0432\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043f\u0440\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u0442\u0438\u044f.<\/li>\n<\/ul>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 WEB \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h2>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0442\u044c \u0432\u043e\u043b\u044e \u0441\u0432\u043e\u0435\u0439 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u043c\u044b\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 <a href=\"http:\/\/www.yiiframework.com\/\">Yii<\/a>. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u044d\u0442\u043e\u0442 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c, \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0430\u0432\u0442\u043e\u0440\u0430\u0437\u0430\u0446\u0438\u044f (\u0442.\u043a. \u043f\u043e\u0440\u0442\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435) \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u043e\u043b\u044f\u043c\u0438 (\u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432), \u0430 \u0435\u0449\u0435 \u043e\u043d \u043c\u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0439 \u043f\u043e\u0440\u0442\u0430\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 7\" src=\"http:\/\/www.pvsm.ru\/images\/2016\/05\/04\/umnyi-WiFi-vyklyuchatel-sveta-7.png\" alt=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430 - 7\" width=\"690\" height=\"332\" \/><\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439 \u0432 \u0437\u043e\u043d\u0435 \u0434\u043e\u0441\u0435\u0433\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0441\u0435\u0442\u0438, \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 ESP. \u041d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u0442\u044c \u043b\u043e\u0433\u0438, \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0448\u0447\u0435 \u0432\u0441\u0435 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0435\u0440 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u042d\u0442\u043e \u0432\u0441\u0451 \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0442\u0430\u043b\u0430, \u0434\u0443\u043c\u0430\u044e \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0438\u0441\u0430\u0442\u044c \u043e \u043d\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0442\u043e \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u043d\u0438\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e, \u0435\u0441\u043b\u0438 \u0434\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u0448\u043b\u0438 \u0432 \u043d\u0435\u0439 \u0447\u0442\u043e \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u0438 \u043a\u0440\u0438\u0442\u0438\u043a\u0435. \u0412 \u0446\u0435\u043b\u043e\u043c, \u043c\u043d\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443\u0437\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u0446\u0435\u043f\u0438 \u044d\u0442\u043e \u0410\u0434\u0430\u043f\u0442\u0435\u0440 \u043d\u0430 5\u0412 \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u0412\u044b \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447. \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f ESP8266-01, \u0442\u043e \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u0432\u044b\u0437\u0432\u0430\u043b \u0443 \u043c\u0435\u043d\u044f \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043d\u0430\u0440\u0435\u043a\u0430\u043d\u0438\u0439 \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0438\u043d\u043e\u0432 GPIO. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440: A3a<\/p>\n<p><a title=\"\u0423\u043c\u043d\u044b\u0439 WiFi \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441\u0432\u0435\u0442\u0430\" href=\"https:\/\/geektimes.ru\/post\/274869\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<br \/>\n<\/a><a href=\"http:\/\/www.pvsm.ru\/umny-j-dom\/119964\">http:\/\/www.pvsm.ru\/umny-j-dom\/119964<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0440\u0438\u043a\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435. \u0418\u0434\u0435\u044f \u00ab\u0443\u043c\u043d\u043e\u0433\u043e\u00bb \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0441\u0432\u0435\u0442\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043d\u043e\u0432\u0430 \u0438, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435,<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[98],"tags":[],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-arduino"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7OYvE-7m","_links":{"self":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=456"}],"version-history":[{"count":1,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":534,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=\/wp\/v2\/posts\/456\/revisions\/534"}],"wp:attachment":[{"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allchina.a-lisa.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}