{"id":269045,"date":"2015-11-26T11:23:02","date_gmt":"2015-11-26T08:23:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=269045"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=269045","title":{"rendered":"\u041c\u043e\u0434\u0443\u043b\u0438 Laurent \u0438 \u0423\u043c\u043d\u044b\u0439 \u0434\u043e\u043c (\u0447\u0430\u0441\u0442\u044c 2). Arduino \u0438 AMS"},"content":{"rendered":"<p>       \u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Laurent (\u041b\u043e\u0440\u0430\u043d) \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"http:\/\/www.kernelchip.ru\/\">KernelChip<\/a> \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0410\u0440\u0434\u0443\u0438\u043d\u043e. \u0412 <a href=\"http:\/\/geektimes.ru\/post\/262892\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0446\u0438\u043a\u043b\u0430 \u0440\u0435\u0447\u044c \u0448\u043b\u0430 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 MajorDoMo, \u0430 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438\u0437 \u0441\u043a\u0435\u0442\u0447\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Processing, \u043f\u0440\u044f\u043c\u043e \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/279\/7d1\/bf2\/2797d1bf243f51c2e44c4bbf9b4282d3.jpg\" alt=\"image\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0410\u0440\u0434\u0443\u0438\u043d\u043e \u043d\u0430\u0448\u0435 \u0432\u0441\u0451<\/h2>\n<p>  \u041a\u0443\u0434\u0430 \u0436\u0435 \u0431\u0435\u0437 \u0410\u0440\u0434\u0443\u0438\u043d\u043e? \u041d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0433\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0435\u0451 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u0430 \u0437\u0430 \u0441\u0435\u0431\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u0435\u0442\u0430\u043b\u044f\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u041b\u043e\u0440\u0430\u043d. \u0418 \u043f\u043e \u043f\u0443\u0442\u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <a href=\"http:\/\/geektimes.ru\/post\/259248\/\">Arduino Mega Server<\/a>, \u043a\u0430\u043a \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Arduino.<\/p>\n<h2>\u0416\u0435\u043b\u0435\u0437\u043e<\/h2>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u043e \u0441\u0435\u0442\u0438 \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 Arduino Uno \u0438\u043b\u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 Arduino Mega \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 \u043f\u043b\u0430\u0442\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 Ethernet Shield, \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0447\u0438\u043f\u0430 W5100. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u044f \u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u043e \u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/086\/9f1\/1a8\/0869f11a82455209389c7e6c37437f0b.jpg\" alt=\"image\"\/><br \/>  <em>Ethernet Shield \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0447\u0438\u043f\u0430 W5100<\/em><\/p>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u0430\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u044f\u0442\u044c \u0441\u043a\u0435\u0442\u0447 \u0438 \u0437\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u044e \u043f\u043b\u0430\u0442\u0443 Uno \u0438\u043b\u0438 Mega, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0435\u0433\u043e \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h2>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438\u0437 \u0441\u043a\u0435\u0442\u0447\u0435\u0439<\/h2>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0438\u043a\u043b\u0430 \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 Laurent \u043f\u043e \u0441\u0435\u0442\u0438, \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0447\u0438\u0442\u0430\u043b \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044e \u0437\u0434\u0435\u0441\u044c \u0442\u0435\u043e\u0440\u0438\u044e.<\/p>\n<p>  \u041e\u0431\u043c\u0435\u043d \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u0435\u0442\u0438 \u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0438\u043c\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c TCP\/IP \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0430 2424 \u043f\u043e\u0440\u0442\u0443. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b (\u0442.\u00a0\u043d. \u041a\u0415 \u043a\u043e\u043c\u0430\u043d\u0434\u044b) \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"http:\/\/www.kernelchip.ru\/\">KernelChip<\/a> \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u041a\u0415 \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u00ab\u0442\u0435\u0445\u0437\u0430\u0434\u0430\u043d\u0438\u0435\u00bb \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u044f\u0437\u044b\u043a \u0441\u043a\u0435\u0442\u0447\u0435\u0439 \u0410\u0440\u0434\u0443\u0438\u043d\u043e.<\/p>\n<h2>\u0421\u043a\u0435\u0442\u0447<\/h2>\n<p>  \u042f \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0440\u0435\u0434\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0410\u0440\u0434\u0443\u0438\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438 \u0443\u043c\u0435\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0435 \u0441\u043a\u0435\u0442\u0447\u0438. \u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 SPI.h \u0438 Ethernet.h \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0448\u0438\u043d\u043e\u0439 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e Ethernet \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<pre><code class=\"java\">#include &lt;SPI.h&gt; #include &lt;Ethernet.h&gt; <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f Ethernet \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043c\u043e\u0434\u0443\u043b\u044f Laurent, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e MAC \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 IP \u0430\u0434\u0440\u0435\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b, \u0430 LAURENT_PORT \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 2424 \u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<pre><code class=\"java\">byte SELF_MAC[] = {0x00, 0x2A, 0xF5, 0x12, 0x67, 0xEE}; byte SELF_IP[] = {192, 168, 2, 20};  byte LAURENT_IP[] = {192, 168, 2, 19}; int LAURENT_PORT = 2424; <\/code><\/pre>\n<p>  \u041d\u0430\u043c \u0435\u0449\u0451 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043e\u043d \u0432\u044b\u0431\u0440\u0430\u043d \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 200 \u0431\u0430\u0439\u0442 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0430\u0441\u043e\u043c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043e 100 \u0431\u0430\u0439\u0442 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<pre><code class=\"java\">char buf[200]; <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0442\u0440\u0438\u0445, \u044d\u0442\u043e Ethernet \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f Laurent. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 lclient.<\/p>\n<pre><code class=\"java\">EthernetClient lclient; <\/code><\/pre>\n<p>  \u0412\u0441\u0451, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0434\u0443\u043b\u044e Laurent.<\/p>\n<pre><code class=\"java\">void sendLaurentRequest() {   if (lclient.connect(LAURENT_IP, LAURENT_PORT)) {      Serial.print(&quot;Command: &quot;);     Serial.println(buf);     lclient.println(buf);     delay(100);        Serial.print(&quot;Answer:  &quot;);     while(lclient.available() != 0) {       char c = lclient.read();       Serial.print(c);     }     delay(500);     lclient.stop();   } else {       Serial.println(&quot;Error sending command&quot;);     } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c Laurent \u043d\u0430 2424 \u043f\u043e\u0440\u0442\u0443, \u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044e \u0438 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 Serial \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f. \u0417\u0430\u0442\u0435\u043c \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f 100 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044f. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u044f\u0442\u044c \u043f\u0430\u0443\u0437\u0430 \u0438 \u0441\u0432\u044f\u0437\u044c \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0440\u0430\u0437\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Ethernet \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439<\/p>\n<pre><code class=\"java\">void ethernetInit() {   Ethernet.begin(SELF_MAC, SELF_IP); } <\/code><\/pre>\n<p>  \u0410 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f Laurent \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 laurentInit(), \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c. \u041e\u043d\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u043d\u044c\u043a\u043e \u0432 \u043d\u0435\u0439 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0434\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043c\u043e\u0434\u0443\u043b\u044f\u043c Laurent.<\/p>\n<pre><code class=\"java\">void laurentInit() {   Serial.println(&quot;Start modul Laurent Init...&quot;);   Serial.print(&quot;Connect to Laurent... &quot;);   if (lclient.connect(LAURENT_IP, LAURENT_PORT)) {     Serial.println(&quot;OK&quot;);     lclient.stop();          \/\/ Send test command     Serial.println(&quot;Selftest...&quot;);     sprintf(buf, &quot;$KE&quot;);     sendLaurentRequest();      \/\/ Send password (default: &quot;Laurent&quot;)     Serial.println(&quot;Set password...&quot;);     sprintf(buf, &quot;$KE,PSW,SET,Laurent&quot;);        sendLaurentRequest();   } else {       Serial.println(&quot;failed&quot;);     }   delay(500);        \/\/ \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u044b\u0434\u0430\u0447\u0443 DATA   sprintf(buf, &quot;$KE,DAT,OFF&quot;);   sendLaurentRequest();   delay(100);      \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435   sprintf(buf, &quot;$KE,REL,2,0&quot;);   sendLaurentRequest();      Serial.println(&quot;Modul Laurent Init done&quot;); } <\/code><\/pre>\n<p>  \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c Laurent. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0443\u0434\u0430\u0451\u0442\u0441\u044f, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435, \u0430 \u0435\u0441\u043b\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u00ab#OK\u00bb.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0430 \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e). \u0418 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f 500 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0432\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u2014 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u044b\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u043c (\u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0438\u0434\u0451\u0442), \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u043b\u0435 \u21162, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432 \u0441\u0432\u043e\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u043d\u0435\u043a\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>  \u0412\u043e\u0442 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0438\u0434\u043d\u044b \u0432\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0432\u0441\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre><code class=\"dos\">Start modul Laurent Init... Connect to Laurent... OK Selftest... Command: $KE Answer:  #OK Set password... Command: $KE,PSW,SET,Laurent Answer:  #PSW,SET,OK Command: $KE,DAT,OFF Answer:  #DAT,OK Command: $KE,REL,2,0 Answer:  #REL,OK Modul Laurent Init done <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0434 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 setup(). \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0440\u0442 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u043c\u0435\u043d\u0430 9600.<\/p>\n<pre><code class=\"java\">void setup() {     Serial.begin(9600);     ethernetInit();   laurentInit(); } <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b, \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u043c Laurent \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u044c \u0438 \u0433\u0430\u0441\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0432\u0435\u0442 \u043b\u0430\u043c\u043f\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0439 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u043c\u0443 \u0440\u0435\u043b\u0435 \u043c\u043e\u0434\u0443\u043b\u044f Laurent.<\/p>\n<pre><code class=\"java\">void loop() {   \/\/ \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435   sprintf(buf, &quot;$KE,REL,2,1&quot;);   sendLaurentRequest();   delay(3000);   \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435   sprintf(buf, &quot;$KE,REL,2,0&quot;);   sendLaurentRequest();   delay(3000); } <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f loop() \u044d\u0442\u043e \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438 \u043b\u0430\u043c\u043f\u0430, \u043f\u043e\u0432\u0438\u043d\u0443\u044f\u0441\u044c \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c, \u0431\u0443\u0434\u0435\u0442 \u0431\u0435\u0441\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u043e \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0438 \u0433\u0430\u0441\u043d\u0443\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0435 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u042d\u0442\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438 \u0442\u0443\u0442 \u0432\u0441\u0451 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a, \u043d\u043e \u0438 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0421 \u043f\u043e\u043b\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u0447\u043d\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043c\u043e\u0434\u0443\u043b\u044f\u043c Laurent.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043a\u0435\u0442\u0447 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u043d\u0438\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u041b\u043e\u0440\u0430\u043d. \u0418\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u044d\u0442\u043e\u0442 \u0441\u043a\u0435\u0442\u0447 \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041f\u0440\u0435\u0434\u0435\u043b\u0430 \u0434\u043b\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0430 \u043d\u0435\u0442. \u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441\u043a\u0435\u0442\u0447\u0430.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043a\u0435\u0442\u0447\u0430<\/b><\/p>\n<div class=\"spoiler_text\">#include &lt;SPI.h&gt;<br \/>  #include &lt;Ethernet.h&gt;<\/p>\n<p>  byte SELF_MAC[] = {0x00, 0x2A, 0xF5, 0x12, 0x67, 0xEE};<br \/>  byte SELF_IP[] = {192, 168, 2, 20};<\/p>\n<p>  byte LAURENT_IP[] = {192, 168, 2, 19};<br \/>  int LAURENT_PORT = 2424;<\/p>\n<p>  char buf[200];<\/p>\n<p>  EthernetClient lclient;<\/p>\n<p>  void ethernetInit() {<br \/>   Ethernet.begin(SELF_MAC, SELF_IP);<br \/>  }<\/p>\n<p>  void laurentInit() {<br \/>   Serial.println(\u00abStart modul Laurent Init&#8230;\u00bb);<br \/>   Serial.print(\u00abConnect to Laurent\u2026 \u201e);<br \/>   if (lclient.connect(LAURENT_IP, LAURENT_PORT)) {<br \/>   Serial.println(\u201cOK\u00bb);<br \/>   lclient.stop();<\/p>\n<p>   \/\/ Send test command<br \/>   Serial.println(\u00abSelftest&#8230;\u00bb);<br \/>   sprintf(buf, &quot;$KE&quot;);<br \/>   sendLaurentRequest();<\/p>\n<p>  \/\/ Send password (default: \u00abLaurent\u00bb)<br \/>   Serial.println(\u00abSet password&#8230;\u00bb);<br \/>   sprintf(buf, &quot;$KE,PSW,SET,Laurent&quot;); <br \/>   sendLaurentRequest();<br \/>   } else {<br \/>   Serial.println(\u00abfailed\u00bb);<br \/>   }<br \/>   delay(500);<\/p>\n<p>   \/\/ \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u044b\u0434\u0430\u0447\u0443 DATA<br \/>   sprintf(buf, &quot;$KE,DAT,OFF&quot;);<br \/>   sendLaurentRequest();<br \/>   delay(100);<\/p>\n<p>   \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435<br \/>   sprintf(buf, &quot;$KE,REL,2,0&quot;);<br \/>   sendLaurentRequest();<\/p>\n<p>   Serial.println(\u00abModul Laurent Init done\u00bb);<br \/>  } \/\/ laurentInit<\/p>\n<p>  void sendLaurentRequest() {<br \/>   if (lclient.connect(LAURENT_IP, LAURENT_PORT)) { <br \/>   Serial.print(\u00abCommand: \u201e);<br \/>   Serial.println(buf);<br \/>   lclient.println(buf);<br \/>   delay(100);<\/p>\n<p>   Serial.print(\u201cAnswer: \u201e);<br \/>   while(lclient.available() != 0) {<br \/>   char c = lclient.read();<br \/>   Serial.print\u00a9;<br \/>   }<br \/>   delay(500);<br \/>   lclient.stop();<br \/>   } else {<br \/>   Serial.println(\u201cError sending command\u00bb);<br \/>   }<br \/>  } \/\/ sendLaurentRequest<\/p>\n<p>  void setup() { <br \/>   Serial.begin(9600); <br \/>   ethernetInit();<br \/>   laurentInit();<br \/>  }<\/p>\n<p>  void loop() {<br \/>   \/\/ \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435<br \/>   sprintf(buf, &quot;$KE,REL,2,1&quot;);<br \/>   sendLaurentRequest();<br \/>   delay(3000);<\/p>\n<p>  \/\/ \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043b\u0435<br \/>   sprintf(buf, &quot;$KE,REL,2,0&quot;);<br \/>   sendLaurentRequest();<br \/>   delay(3000);<br \/>  }  <\/div>\n<\/div>\n<h2>Arduino Mega Server<\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/6cb\/44c\/34f\/6cb44c34fc97289e192f28cc8e59fb8c.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/geektimes.ru\/post\/264360\/\">Arduino Mega Server<\/a> (AMS) \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f Arduino Mega (\u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0438 \u0434\u043b\u044f Arduino DUE \u0438, \u0432\u0441\u043a\u043e\u0440\u0435, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 32-\u0431\u0438\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c M0 (Zero) \u0438 Genuino 101), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u00ab\u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0436\u0438\u0437\u043d\u0438\u00bb \u0438 \u043f\u043b\u044e\u0441 \u0435\u0449\u0451 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. AMS \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0438 Laurent \u043f\u0440\u044f\u043c\u043e \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0438 \u0432\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c, \u043a\u0440\u043e\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438. <\/p>\n<p>  AMS \u0438\u043c\u0435\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u043a\u0435\u0442\u0447\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <\/p>\n<pre><code class=\"java\">#define LAURENT_FEATURE <\/code><\/pre>\n<p>  \u0438\u043b\u0438 <\/p>\n<pre><code class=\"java\">\/\/#define LAURENT_FEATURE <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435, \u0447\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u0448\u0430\u043f\u043a\u0435 \u0441\u0430\u0439\u0442\u0430. \u0418\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u0442\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0438\u043d\u0434\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0438\u043c \u0446\u0432\u0435\u0442\u043e\u043c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u00ab\u041b\u043e\u0440\u0430\u043d\u0430\u043c\u0438\u00bb LRT \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/7bb\/e3b\/f7e\/7bbe3bf7ea1146478f40eff0c230d38f.png\" alt=\"image\"\/><br \/>  <em>\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/em><\/p>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0442\u0432\u0435\u0442\u0430\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f Laurent<\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f, \u043d\u043e \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438 Arduino Mega Server. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u043e\u0442\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Laurent. \u0412 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 25 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0451 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u044d\u0442\u043e \u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0438 \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c laurent.ino \u0438\u0437 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 AMS:<\/p>\n<pre><code class=\"java\">byte MAX_LEN_LREQUEST = 25; String lrequest = String(MAX_LEN_LREQUEST);  \u041d\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438).  void sendLaurentRequest() {   if (lclient.connect(LAURENT_IP, LAURENT_PORT)) {      Serialprint(&quot;Command: &quot;);     Serial.println(buf);     lclient.println(buf);     delay(100);        Serialprint(&quot;Answer:  &quot;);     \/\/ --------------------&gt;     lrequest = &quot;&quot;;     \/\/ --------------------&gt;     while(lclient.available() != 0) {       char c = lclient.read();       Serial.print(c);       \/\/ --------------------&gt;       if (lrequest.length() &lt; MAX_LEN_LREQUEST) {         lrequest += (c);       }       \/\/ --------------------&gt;     }     delay(500);     lclient.stop();   } else {       Serialprint(&quot;Error sending command\\n&quot;);     } } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u044b \u041b\u043e\u0440\u0430\u043d\u043e\u0432 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e lrequest \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u0432\u0441\u0451, \u0447\u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u043c. \u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u0440\u044f\u043c\u043e \u0432 dash-\u043f\u0430\u043d\u0435\u043b\u044c \u0432 \u0448\u0430\u043f\u043a\u0435 \u0441\u0430\u0439\u0442\u0430 AMS.<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f Serialprint \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 Serial.print \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u043d\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u0418 \u0435\u0451 \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0442\u043e\u0447\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0441\u043b\u043e\u0432\u0430\u043c\u0438.<\/p>\n<h2>\u0412\u044b\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430<\/h2>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u041b\u043e\u0440\u0430\u043d \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 Arduino Mega Server. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0446\u0438\u043a\u043b loop() \u0441\u043a\u0435\u0442\u0447\u0430 AMS. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b arduino_mega_server.ino \u0438 \u043f\u0435\u0440\u0435\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 cyclosInSecWork() \u0432\u0432\u043e\u0434\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"java\">    #ifdef LAURENT_FEATURE       if (cycle30s) {         sprintf(buf, &quot;$KE&quot;);            sendLaurentRequest();       }     #endif <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 \u0442\u0440\u0438\u0434\u0446\u0430\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u043c\u043e\u0434\u0443\u043b\u044f Laurent. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 lrequest \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043c\u043e\u0436\u0435\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c server_ajax.ino \u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435, \u0432 \u043a\u043e\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 responseDash(EthernetClient cl), \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 cl.println(&quot;&quot;); \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"java\">    #ifdef LAURENT_FEATURE       sendTagString(&quot;laurent&quot;, &quot;&quot;, lrequest, cl);     #endif <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0443. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u0435 \u0432\u0435\u0449\u0438: \u043f\u0435\u0440\u0432\u0430\u044f \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u00ab\u043b\u043e\u0432\u0438\u0442\u044c\u00bb \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043a\u043e\u0434 HTML \u043d\u0430 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435 AMS, \u0433\u0434\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b scripts.js \u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 getDashData() \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u043a\u043e\u0431\u043a\u043e\u0439 } \/\/if (this.responseXML != null) \u0432\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u043e\u0441\u044b\u043b\u043a\u0438.<\/p>\n<pre><code class=\"javascript\">          \/\/ Laurent           try {             var laurent = this.responseXML.getElementsByTagName('laurent')[0].childNodes[0].nodeValue;           } catch (err) {               laurent = &quot;-&quot;;             }           document.getElementById(&quot;laurent&quot;).innerHTML = laurent;  <\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0430\u0439\u043b dash.htm \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 AMS \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d. \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 class=\u00abonline-device\u00bb \u0432\u0432\u043e\u0434\u0438\u043c \u043d\u0430\u0448\u0443 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code class=\"html\">&lt;p&gt;Laurent: &lt;span class=&quot;value&quot; id=&quot;laurent&quot;&gt;...&lt;\/span&gt;&lt;\/p&gt; <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u041c\u044b \u0432\u044b\u0432\u0435\u043b\u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f Laurent \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 Arduino Mega Server. \u0418 \u0432\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0430\u0440\u0430\u043d\u0438\u0439. \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e \u0432 \u043f\u0430\u043d\u0435\u043b\u0438 AMS \u0438 \u043e\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434, \u0442\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0447\u0435\u0440\u0435\u0437 30 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/126\/5f2\/c08\/1265f2c08e49db3483fb7df355ac27e1.png\" alt=\"image\"\/><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u041b\u043e\u0440\u0430\u043d \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u0438 Arduino Mega Server \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u0438 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432 \u0441\u0432\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0423\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430, \u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u0410 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u00ab\u041b\u043e\u0440\u0430\u043d\u0430\u043c\u0438\u00bb \u043f\u0440\u044f\u043c\u043e \u0441 \u044d\u043a\u0440\u0430\u043d\u0430 \u0441\u0432\u043e\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0435\u0442\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c.               <\/p>\n<div class=\"clear\"><\/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=\"http:\/\/geektimes.ru\/post\/266454\/\"> http:\/\/geektimes.ru\/post\/266454\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0437 \u0446\u0438\u043a\u043b\u0430 \u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Laurent (\u041b\u043e\u0440\u0430\u043d) \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <a href=\"http:\/\/www.kernelchip.ru\/\">KernelChip<\/a> \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0441 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0410\u0440\u0434\u0443\u0438\u043d\u043e. \u0412 <a href=\"http:\/\/geektimes.ru\/post\/262892\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u0446\u0438\u043a\u043b\u0430 \u0440\u0435\u0447\u044c \u0448\u043b\u0430 \u043e\u0431 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 MajorDoMo, \u0430 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0438\u0437 \u0441\u043a\u0435\u0442\u0447\u0435\u0439 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Processing, \u043f\u0440\u044f\u043c\u043e \u0441 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/279\/7d1\/bf2\/2797d1bf243f51c2e44c4bbf9b4282d3.jpg\" alt=\"image\"\/>  <\/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-269045","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269045","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=269045"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/269045\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=269045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=269045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=269045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}