{"id":75788,"date":"2020-02-15T13:27:26","date_gmt":"2020-02-15T07:27:26","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=75788"},"modified":"2022-01-08T22:24:22","modified_gmt":"2022-01-08T16:24:22","slug":"%d0%b2%d0%b5%d0%b1-%d1%81%d0%b5%d1%80%d0%b2%d0%b5%d1%80-%d0%bd%d0%b0-enc28j60-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=75788","title":{"rendered":"\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 ENC28J60 (Arduino)"},"content":{"rendered":"<p>ENC28J60 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 ISP \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 20 \u041c\u0413\u0446. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 TCP\/IP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u044a\u0451\u043c RJ-45. \u041c\u043e\u0434\u0443\u043b\u044c \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d \u0441 \u043d\u0438\u043c.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-75789\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035.png\" alt=\"\" width=\"269\" height=\"249\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035.png 393w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-123035-200x185.png 200w\" sizes=\"auto, (max-width: 269px) 100vw, 269px\" \/><\/a><\/p>\n<p><strong>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60:<\/strong><\/p>\n<ul>\n<li>\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 Ethernet \u0441\u0435\u0442\u044f\u043c\u0438 10\/100\/1000 Base-T. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 10 \u043c\u0431\u0438\u0442\/\u0441\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f TCP\/IP \u0441\u0442\u0435\u043a\u0430.<\/li>\n<li>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u2013 SPI, \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0434\u043e 20 \u043c\u0413\u0446.<\/li>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,1 \u2013 3,6 \u0412. \u0422\u0438\u043f\u043e\u0432\u043e\u0435 3,3 \u0412.<\/li>\n<li>\u0422\u043e\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,3 \u0412:\n<ul>\n<li>\u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043e 180 \u043c\u0410;<\/li>\n<li>\u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 120 \u043c\u0410;<\/li>\n<li>\u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 2 \u043c\u0410.<\/li>\n<\/ul>\n<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u044c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0440\u0430\u0437\u0432\u044f\u0437\u043a\u0443 \u043e\u0442 \u043b\u0438\u043d\u0438\u0438 \u0441\u0432\u044f\u0437\u0438.<\/li>\n<li>\u0412\u044b\u0432\u043e\u0434\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b \u0441 5 \u0432\u043e\u043b\u044c\u0442\u043e\u0432\u044b\u043c \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u043c.<\/li>\n<\/ul>\n<div id=\"marketWidget\"><\/div>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0442\u043e\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 180 \u043c\u0410, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,3 \u0412 \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 250 \u043c\u0410.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/2439626348.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75816\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/2439626348.png\" alt=\"\" width=\"275\" height=\"199\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/2439626348.png 275w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/2439626348-200x145.png 200w\" sizes=\"auto, (max-width: 275px) 100vw, 275px\" \/><\/a><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60 \u043a \u043f\u043b\u0430\u0442\u0435 Arduino Nano (Uno):<\/p>\n<table style=\"height: 266px;\" width=\"747\">\n<tbody>\n<tr>\n<td style=\"width: 359px; text-align: center;\"><strong>\u041f\u043b\u0430\u0442\u0430 Arduino<\/strong><\/td>\n<td style=\"width: 372px; text-align: center;\"><strong>\u041c\u043e\u0434\u0443\u043b\u044c ENC28J60<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">D12<\/td>\n<td style=\"width: 372px; text-align: center;\">SO<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">D11<\/td>\n<td style=\"width: 372px; text-align: center;\">SI<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">D13<\/td>\n<td style=\"width: 372px; text-align: center;\">SCK<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">D10<\/td>\n<td style=\"width: 372px; text-align: center;\">CS<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">RES<\/td>\n<td style=\"width: 372px; text-align: center;\">RST<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f 3,3 \u0412<\/td>\n<td style=\"width: 372px; text-align: center;\">VCC<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 359px; text-align: center;\">GND<\/td>\n<td style=\"width: 372px; text-align: center;\">GND<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 ENC28J60 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 HTML \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432. \u0421\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044c ENC28J60 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0431\u0435\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0443 (\u0440\u043e\u0443\u0442\u0435\u0440) \u0438\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u041f\u041a.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441\u043a\u0435\u0442\u0447\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0432\u0435\u0431 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440.<\/p>\n<hr \/>\n<h4 style=\"text-align: center;\">\u0412\u044b\u0432\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 HTML<\/h4>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard.h&gt; \/\/ <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/EtherCard-master.zip\">EtherCard-master<\/a>.zip<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nBufferFiller bfill;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;h1&gt;\u041f\u0440\u0438\u0432\u0435\u0442 \u041c\u0418\u0420!!!&lt;\/h&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/html&gt; \"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac, <span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span> \r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span>homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;   \r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-125240.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75793\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-125240.png\" alt=\"\" width=\"407\" height=\"137\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-125240.png 407w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-125240-200x67.png 200w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/a><\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u0432\u0435\u0441\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 ENC28J60. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0441\u043a\u0435\u0442\u0447\u0435:<\/p>\n<blockquote><p><span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;<\/p><\/blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0412\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 ENC28J60 \u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0443, \u0442\u043e \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c IP \u0430\u0434\u0440\u0435\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0435\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u043e\u0443\u0442\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 192.168.0.1 , \u0442\u043e \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u043d\u0435 \u0437\u0430\u043d\u044f\u0442\u044b\u0439 IP \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0442\u0438 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 192.168.0.100).<\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0430\u0434\u0440\u0435\u0441, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b ENC28J60 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u041f\u041a, \u0442\u043e \u043c\u043e\u044f \u0441\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (\u041f\u041a \u0438 ENC28J60) \u0438 \u0432\u044b\u0431\u0440\u0430\u043b IP \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0446\u0438\u0444\u0440\u044b (\u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435), \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b \u0441 MAC \u0430\u0434\u0440\u0435\u0441\u0430\u043c\u0438 \u0443\u0441\u0442-\u0432 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75794\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116.png\" alt=\"\" width=\"520\" height=\"514\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116.png 520w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-200x198.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-500x494.png 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-130116-45x45.png 45w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/a><\/p>\n<hr \/>\n<h4 style=\"text-align: center;\">\u0422\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440 \u043d\u0430 DS18B20<\/h4>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20. \u0414\u0430\u0442\u0447\u0438\u043a \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0435\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard.h&gt;          \/\/ <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/EtherCard-master.zip\">EtherCard-master<\/a>.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;OneWire.h&gt;            \/\/https:\/\/github.com\/PaulStoffregen\/OneWire\/archive\/master.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;DallasTemperature.h&gt;  \/\/ http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/DallasTemperature.zip<\/span>\r\n\u00a0\r\nOneWire oneWire<span style=\"color: #66cc66;\">(<\/span>A0<span style=\"color: #66cc66;\">)<\/span>;\r\nDallasTemperature t<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">&amp;<\/span>oneWire<span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nfloat temp;\r\n<span style=\"color: #0066cc;\">int<\/span> temp0,temp1;\r\nBufferFiller bfill;\r\n<span style=\"color: #0066cc;\">String<\/span> line;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;meta http-equiv='refresh' content='10'\/&gt;\"<\/span><span style=\"color: #808080; font-style: italic;\">\/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;h1&gt;\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430: $D.$D &amp;#176;C&lt;\/h1&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/html&gt; \"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span>,temp0,temp1<span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac, <span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n  t.begin(); \r\n  t.setResolution(11);\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  t.<span style=\"color: #006600;\">requestTemperatures<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  temp = t.<span style=\"color: #006600;\">getTempCByIndex<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  temp0 = <span style=\"color: #0066cc;\">int<\/span><span style=\"color: #66cc66;\">(<\/span>temp<span style=\"color: #66cc66;\">)<\/span>;\r\n  temp1 = <span style=\"color: #66cc66;\">(<\/span>temp-temp0<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span>;\r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>  <span style=\"color: #808080; font-style: italic;\">\/\/ check if valid tcp data is received <\/span>\r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span>homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;   \r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-131059.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75798\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-131059.png\" alt=\"\" width=\"446\" height=\"179\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-131059.png 446w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/\u0421\u043d\u0438\u043c\u043e\u043a-\u044d\u043a\u0440\u0430\u043d\u0430-\u043e\u0442-2020-02-15-131059-200x80.png 200w\" sizes=\"auto, (max-width: 446px) 100vw, 446px\" \/><\/a><\/p>\n<hr \/>\n<h4 style=\"text-align: center;\">\u0422\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 DS18B20<\/h4>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 D2 Arduino. \u0422\u0430\u043a \u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 10px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;EtherCard.h&gt;         \/\/ EtherCard-master.zip <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;OneWire.h&gt;           \/\/https:\/\/github.com\/PaulStoffregen\/OneWire\/archive\/master.zip <\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;DallasTemperature.h&gt; \/\/ http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/DallasTemperature.zip<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;EEPROM.h&gt;<\/span>\r\nOneWire oneWire<span style=\"color: #66cc66;\">(<\/span>A0<span style=\"color: #66cc66;\">)<\/span>;\r\nDallasTemperature t<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">&amp;<\/span>oneWire<span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> byte mymac<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> 0x74,0x69,0x69,0x2D,0x30,0x31 <span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">static<\/span> byte myip<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span> = <span style=\"color: #66cc66;\">{<\/span> <span style=\"color: #cc66cc;\">10<\/span>,<span style=\"color: #cc66cc;\">42<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">100<\/span> <span style=\"color: #66cc66;\">}<\/span>;\r\n\u00a0\r\nbyte Ethernet::buffer<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">800<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\nfloat temp;\r\n<span style=\"color: #0066cc;\">int<\/span> reg,temp0,temp1,a,w;\r\nconst byte gis = <span style=\"color: #cc66cc;\">1<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0433\u0438\u0441\u0442\u0435\u0440\u0435\u0437\u0438\u0441 1 \u0433\u0440\u0430\u0434\u0443\u0441<\/span>\r\nBufferFiller bfill;\r\n<span style=\"color: #0066cc;\">String<\/span> line;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">static<\/span> word homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  bfill = ether.<span style=\"color: #006600;\">tcpOffset<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  bfill.<span style=\"color: #006600;\">emit_p<\/span><span style=\"color: #66cc66;\">(<\/span>PSTR<span style=\"color: #66cc66;\">(<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;html&gt;&lt;head&gt;&lt;meta charset='UTF-8'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;meta http-equiv='refresh' content='10'\/&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;style&gt;.tab1 {background-color:#F5F5F5;border-radius: 5px;margin: auto;}&lt;\/style&gt;&lt;\/head&gt;\"<\/span>\r\n\u00a0\r\n<span style=\"color: #ff0000;\">\"&lt;br&gt;&lt;TABLE class='tab1' align='center' width='470' BORDER='1' cellspacing='0' cellpadding='10'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;td&gt;&lt;center&gt;&lt;big&gt;&lt;b&gt;\u0422\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440 DS18B20&lt;\/b&gt;&lt;\/big&gt;&lt;\/td&gt;&lt;tr&gt;&lt;td&gt;&lt;center&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430: &lt;b&gt;$D.$D &lt;\/b&gt;&amp;#176;C\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/td&gt;&lt;tr&gt;&lt;td align='center'&gt;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (0...125&amp;#176;C)\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;form action='' method='GET'&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;br&gt;&lt;input type='text' name='reg' autocomplete='off' size='1'&gt;&lt;\/input&gt;  \"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;button&gt;\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c&lt;\/button&gt;&lt;\/form&gt;&lt;\/td&gt;&lt;tr&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;td&gt;&lt;center&gt;\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0438: &lt;b&gt;$D &amp;#176;C&lt;\/b&gt;&lt;\/td&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/table&gt;\"<\/span>\r\n<span style=\"color: #ff0000;\">\"&lt;\/center&gt;&lt;\/body&gt;&lt;\/html&gt; \"<\/span>\r\n  <span style=\"color: #66cc66;\">)<\/span>,temp0,temp1,reg<span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">return<\/span> bfill.<span style=\"color: #0066cc;\">position<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  pinMode<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>, OUTPUT<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ D2 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u043b\u0435 \u043d\u0430\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/span>\r\n  ether.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof Ethernet::buffer, mymac, <span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  ether.<span style=\"color: #006600;\">staticSetup<\/span><span style=\"color: #66cc66;\">(<\/span>myip<span style=\"color: #66cc66;\">)<\/span>;\r\n  reg = EEPROM.<span style=\"color: #006600;\">read<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  t.begin(); \r\n  t.setResolution(9);\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop <span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  t.<span style=\"color: #006600;\">requestTemperatures<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  temp = t.<span style=\"color: #006600;\">getTempCByIndex<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  temp0 = <span style=\"color: #0066cc;\">int<\/span><span style=\"color: #66cc66;\">(<\/span>temp<span style=\"color: #66cc66;\">)<\/span>;\r\n  temp1 = <span style=\"color: #66cc66;\">(<\/span>temp-temp0<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">*<\/span><span style=\"color: #cc66cc;\">100<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg <span style=\"color: #66cc66;\">&gt;<\/span>= temp + gis<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>digitalWrite<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>,HIGH<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span> \r\n<span style=\"color: #b1b100;\">  if<\/span><span style=\"color: #66cc66;\">(<\/span>reg <span style=\"color: #66cc66;\">&lt;<\/span>= temp - gis<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>digitalWrite<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>,LOW<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span> \r\n\u00a0\r\n  word pos = ether.<span style=\"color: #006600;\">packetLoop<\/span><span style=\"color: #66cc66;\">(<\/span>ether.<span style=\"color: #006600;\">packetReceive<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span> <span style=\"color: #66cc66;\">(<\/span>pos<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>  <span style=\"color: #808080; font-style: italic;\">\/\/ check if valid tcp data is received<\/span>\r\n    char <span style=\"color: #66cc66;\">*<\/span><span style=\"color: #0066cc;\">data<\/span> = <span style=\"color: #66cc66;\">(<\/span>char <span style=\"color: #66cc66;\">*<\/span><span style=\"color: #66cc66;\">)<\/span> Ethernet::buffer + pos;\r\n\u00a0\r\n  line = <span style=\"color: #0066cc;\">data<\/span>;a = line.<span style=\"color: #0066cc;\">indexOf<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"?reg=\"<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>a<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg = line.<span style=\"color: #0066cc;\">substring<\/span><span style=\"color: #66cc66;\">(<\/span>a+<span style=\"color: #cc66cc;\">5<\/span>, a+<span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #66cc66;\">)<\/span>.<span style=\"color: #006600;\">toInt<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;w=<span style=\"color: #cc66cc;\">1<\/span>;\r\n  <span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>reg<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">125<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>reg=<span style=\"color: #cc66cc;\">125<\/span>;<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n  ether.<span style=\"color: #006600;\">httpServerReply<\/span><span style=\"color: #66cc66;\">(<\/span>homePage<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;   \r\n\u00a0\r\n if<span style=\"color: #66cc66;\">(<\/span>w==<span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>w=<span style=\"color: #cc66cc;\">0<\/span>;EEPROM.<span style=\"color: #006600;\">update<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>,reg<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span><span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/7238682394.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-75800\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/7238682394.png\" alt=\"\" width=\"760\" height=\"368\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/7238682394.png 760w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/7238682394-200x97.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2020\/02\/7238682394-500x242.png 500w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>\u0424\u043e\u0440\u0443\u043c &#8212; <a href=\"http:\/\/forum.rcl-radio.ru\/viewtopic.php?pid=949#p949\">http:\/\/forum.rcl-radio.ru\/viewtopic.php?pid=949#p949<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ENC28J60 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u043f\u043b\u0430\u0442\u0435 Arduino \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0442\u0430\u043a\u0442\u043e\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u043e\u0442\u0430 ISP \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c 20 \u041c\u0413\u0446. \u0414\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 TCP\/IP \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u044a\u0451\u043c RJ-45. \u041c\u043e\u0434\u0443\u043b\u044c \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d \u0441 \u043d\u0438\u043c. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f ENC28J60: \u0421\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 Ethernet \u0441\u0435\u0442\u044f\u043c\u0438 10\/100\/1000 Base-T. \u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 10 \u043c\u0431\u0438\u0442\/\u0441\u0435\u043a, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f TCP\/IP \u0441\u0442\u0435\u043a\u0430. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":75789,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,19],"tags":[],"class_list":["post-75788","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-19"],"views":10100,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/75788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=75788"}],"version-history":[{"count":17,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/75788\/revisions"}],"predecessor-version":[{"id":111272,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/75788\/revisions\/111272"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/75789"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=75788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=75788"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=75788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}