{"id":45839,"date":"2018-07-23T13:51:07","date_gmt":"2018-07-23T07:51:07","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=45839"},"modified":"2022-01-13T22:10:18","modified_gmt":"2022-01-13T16:10:18","slug":"max6675-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=45839","title":{"rendered":"MAX6675 (Arduino)"},"content":{"rendered":"<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0418\u041c\u0421\u00a0MAX6675 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442 \u0422\u042d\u0414\u0421 \u0442\u0435\u0440\u043c\u043e\u043f\u0430\u0440\u044b \u0442\u0438\u043f\u0430 \u041a (\u0425\u0410), \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u0430\u0445 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430, \u0442\u0430\u043a \u0436\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430\u00a0MAX6675 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b.<\/p>\n<p>MAX6675 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 \u0442\u0435\u0440\u043c\u043e\u043f\u0430\u0440\u043e\u0439 \u0442\u0438\u043f\u0430 \u041a \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1024\u00a0\u00ba\u0421, \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c 0.25\u00a0\u00ba\u0421. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439<\/p>\n<table style=\"height: 134px;\" width=\"677\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><strong>t (\u00ba\u0421)<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>t \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0435\u00a0<\/strong><strong>(\u00ba\u0421)<\/strong><\/td>\n<td style=\"text-align: center;\">\u00a0<strong>t (\u00ba\u0421)<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>t \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u043e\u0435\u00a0<\/strong><strong>(\u00ba\u0421)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">100<\/td>\n<td style=\"text-align: center;\">100<\/td>\n<td style=\"text-align: center;\">600<\/td>\n<td style=\"text-align: center;\">595<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">200<\/td>\n<td style=\"text-align: center;\">202<\/td>\n<td style=\"text-align: center;\">700<\/td>\n<td style=\"text-align: center;\">693<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">300<\/td>\n<td style=\"text-align: center;\">302<\/td>\n<td style=\"text-align: center;\">800<\/td>\n<td style=\"text-align: center;\">789<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">400<\/td>\n<td style=\"text-align: center;\">401<\/td>\n<td style=\"text-align: center;\">900<\/td>\n<td style=\"text-align: center;\">890<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">500<\/td>\n<td style=\"text-align: center;\">497<\/td>\n<td style=\"text-align: center;\">1000<\/td>\n<td style=\"text-align: center;\">993<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><a href=\"http:\/\/rcl-radio.ru\/?attachment_id=45849\" rel=\"attachment wp-att-45849\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-45849\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/arduinoMAXX.gif\" alt=\"\" width=\"626\" height=\"354\" \/><\/a><\/pre>\n<pre class=\"cpp\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #339900;\">#include &lt;max6675.h&gt;<\/span>\r\n<span style=\"color: #339900;\">#include &lt;LiquidCrystal.h&gt;<\/span>\r\n<span style=\"color: #339900;\">#include &lt;Wire.h&gt;<\/span>\r\nLiquidCrystal lcd<span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">7<\/span>, <span style=\"color: #0000dd;\">8<\/span>, <span style=\"color: #0000dd;\">9<\/span>, <span style=\"color: #0000dd;\">10<\/span>, <span style=\"color: #0000dd;\">11<\/span>, <span style=\"color: #0000dd;\">12<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span><span style=\"color: #666666;\">\/\/ RS,E,D4,D5,D6,D7<\/span>\r\n\u00a0\r\n<span style=\"color: #0000ff;\">int<\/span> thermoDO <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">4<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #0000ff;\">int<\/span> thermoCS <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">5<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #0000ff;\">int<\/span> thermoCLK <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">6<\/span><span style=\"color: #008080;\">;<\/span>\r\nMAX6675 thermocouple<span style=\"color: #008000;\">(<\/span>thermoCLK, thermoCS, thermoDO<span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #0000ff;\">double<\/span> t_c,t_sum,t_iz<span style=\"color: #008080;\">;<\/span> \r\n\u00a0\r\n<span style=\"color: #0000ff;\">void<\/span> setup<span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">{<\/span>Serial.<span style=\"color: #007788;\">begin<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">9600<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>lcd.<span style=\"color: #007788;\">begin<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">16<\/span>, <span style=\"color: #0000dd;\">2<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>delay<span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">500<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span><span style=\"color: #008000;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0000ff;\">void<\/span> loop<span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">{<\/span>\r\n  t_sum<span style=\"color: #000080;\">=<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span>\r\n  lcd.<span style=\"color: #007788;\">setCursor<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">0<\/span>,<span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>lcd.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"MAX6675\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  lcd.<span style=\"color: #007788;\">setCursor<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">0<\/span>,<span style=\"color: #0000dd;\">1<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>lcd.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"T = \"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  lcd.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span>t_iz,<span style=\"color: #0000dd;\">1<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  lcd.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000ff;\">char<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #0000dd;\">223<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>lcd.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"C \"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"C = \"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span> \r\n  Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span>thermocouple.<span style=\"color: #007788;\">readCelsius<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  <span style=\"color: #0000ff;\">for<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #0000ff;\">int<\/span> i<span style=\"color: #000080;\">=<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span>i<span style=\"color: #000080;\">&lt;<\/span><span style=\"color: #0000dd;\">5<\/span><span style=\"color: #008080;\">;<\/span>i<span style=\"color: #000040;\">++<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">{<\/span>\r\n    t_c<span style=\"color: #000080;\">=<\/span>thermocouple.<span style=\"color: #007788;\">readCelsius<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n    t_sum<span style=\"color: #000080;\">=<\/span>t_sum<span style=\"color: #000040;\">+<\/span>t_c<span style=\"color: #008080;\">;<\/span>\r\n    delay<span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">200<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  <span style=\"color: #008000;\">}<\/span>\r\n  t_iz<span style=\"color: #000080;\">=<\/span>t_sum<span style=\"color: #000040;\">\/<\/span><span style=\"color: #0000dd;\">5<\/span><span style=\"color: #008080;\">;<\/span>\r\n  lcd.<span style=\"color: #007788;\">clear<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #008000;\">}<\/span><\/pre>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0439 \u0441\u043a\u0435\u0442\u0447 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c, \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 0.5\u00a0\u00ba \u0432\u044b\u043d\u0443\u0434\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439, \u0442\u0430\u043a \u0436\u0435 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440 \u043d\u0430 \u0442\u0435\u0440\u043c\u043e\u043f\u0430\u0440\u043d\u043e\u043c \u0432\u0445\u043e\u0434\u0435 0,1 \u043c\u043a\u0424.<\/p>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/max6675.zip\">max6675.h<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0418\u041c\u0421\u00a0MAX6675 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u0440\u0438\u0442 \u0422\u042d\u0414\u0421 \u0442\u0435\u0440\u043c\u043e\u043f\u0430\u0440\u044b \u0442\u0438\u043f\u0430 \u041a (\u0425\u0410), \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0434\u0443\u0441\u0430\u0445 \u0426\u0435\u043b\u044c\u0441\u0438\u044f \u0438 \u0424\u0430\u0440\u0435\u043d\u0433\u0435\u0439\u0442\u0430, \u0442\u0430\u043a \u0436\u0435 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430\u00a0MAX6675 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u044b. MAX6675 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0441 \u0442\u0435\u0440\u043c\u043e\u043f\u0430\u0440\u043e\u0439 \u0442\u0438\u043f\u0430 \u041a \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 1024\u00a0\u00ba\u0421, \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c 0.25\u00a0\u00ba\u0421. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0SPI \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439 t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":45842,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-45839","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":8611,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45839","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=45839"}],"version-history":[{"count":8,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45839\/revisions"}],"predecessor-version":[{"id":111548,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/45839\/revisions\/111548"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/45842"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45839"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}