{"id":49743,"date":"2018-09-18T13:18:41","date_gmt":"2018-09-18T07:18:41","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=49743"},"modified":"2022-01-12T18:45:25","modified_gmt":"2022-01-12T12:45:25","slug":"%d0%bc%d0%be%d0%b4%d1%83%d0%bb%d1%8c-bmp180-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=49743","title":{"rendered":"\u041c\u043e\u0434\u0443\u043b\u044c BMP180\u00a0(Arduino)"},"content":{"rendered":"<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756.jpg\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-49744 alignright\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756.jpg\" alt=\"\" width=\"217\" height=\"217\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756.jpg 800w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756-200x200.jpg 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756-500x500.jpg 500w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756-768x768.jpg 768w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/765757657657676765756-45x45.jpg 45w\" sizes=\"auto, (max-width: 217px) 100vw, 217px\" \/><\/a>\u041c\u043e\u0434\u0443\u043b\u044c BMP180\u00a0 \u2014 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u0438\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u044b\u043c \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439\u00a0\u0441\u0440\u0435\u0434\u044b.<\/p>\n<p><strong>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f BMP180:<\/strong><\/p>\n<ul>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 3.3 &#8230; 5 \u0412<\/li>\n<li>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0442\u043e\u043a: 5 \u043c\u043a\u0410<\/li>\n<li>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f: 300hPa .. 1100hPa<\/li>\n<li>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f: 0,1 hPa<\/li>\n<li>\u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b: 0,1\u00b0\u0421<\/li>\n<li>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: I2C<\/li>\n<\/ul>\n<div id=\"marketWidget\"><\/div>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Arduino Nano:<\/p>\n<ul>\n<li>A4\u00a0 SDA<\/li>\n<li>A5\u00a0 SCL<\/li>\n<li>VIN +5 \u0438\u043b\u0438 +3.3 \u0412<\/li>\n<\/ul>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;SFE_BMP180.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;Wire.h&gt;<\/span>\r\n\u00a0\r\nSFE_BMP180 h;\r\n\u00a0\r\ndouble t,p;\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\nSerial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\nh.<span style=\"color: #006600;\">begin<\/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> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>\r\n<span style=\"color: #0066cc;\">int<\/span> i = h.<span style=\"color: #006600;\">startTemperature<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\ndelay<span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/span>\r\nh.<span style=\"color: #006600;\">getTemperature<\/span><span style=\"color: #66cc66;\">(<\/span>t<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/span>\r\nSerial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>t,<span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\nSerial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" C\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n\u00a0\r\ni = h.<span style=\"color: #006600;\">startPressure<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c 0-3<\/span>\r\ndelay<span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/span>\r\nh.<span style=\"color: #006600;\">getPressure<\/span><span style=\"color: #66cc66;\">(<\/span>p,t<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/span>\r\nSerial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>p<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0432 \u043c\u0438\u043b\u043b\u0438\u0431\u0430\u0440\u0430\u0445<\/span>\r\nSerial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" mbar\"<\/span><span style=\"color: #66cc66;\">)<\/span>; \r\n\u00a0\r\nSerial.<span style=\"color: #0066cc;\">print<\/span><span style=\"color: #66cc66;\">(<\/span>p<span style=\"color: #66cc66;\">\/<\/span><span style=\"color: #cc66cc;\">1.333224<\/span>,<span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432 \u043c\u043c.\u0440\u0442.\u0441\u0442<\/span>\r\nSerial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\" mm Hg\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\nSerial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #ff0000;\">\"\"<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\ndelay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">5000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-18.09.2018-131617.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-49745\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-18.09.2018-131617.png\" alt=\"\" width=\"385\" height=\"355\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-18.09.2018-131617.png 385w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-18.09.2018-131617-200x184.png 200w\" sizes=\"auto, (max-width: 385px) 100vw, 385px\" \/><\/a><\/p>\n<blockquote>\n<p style=\"text-align: center;\"><strong>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/SFE_BMP180.zip\">SFE_BMP180<\/a>.zip<\/strong><\/p>\n<\/blockquote>\n<hr \/>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #ffffff;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 50%; border-color: #ffffff;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142548.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-49769\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142548.png\" alt=\"\" width=\"297\" height=\"185\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142548.png 297w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142548-200x125.png 200w\" sizes=\"auto, (max-width: 297px) 100vw, 297px\" \/><\/a><\/td>\n<td style=\"width: 50%; border-color: #ffffff;\"><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142558.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-49770\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142558.png\" alt=\"\" width=\"312\" height=\"194\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142558.png 312w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-142558-200x124.png 200w\" sizes=\"auto, (max-width: 312px) 100vw, 312px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0435\u0442\u0447 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0\u0441\u0435\u043c\u0438\u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043d\u044b\u0439 \u0447\u0435\u0442\u044b\u0440\u0435\u0445-\u0440\u0430\u0437\u0440\u044f\u0434\u043d\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 TM1637 (\u043c\u043e\u0434\u0443\u043b\u044c TM1637). \u041f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-49767 aligncenter\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-141809.png\" alt=\"\" width=\"558\" height=\"380\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-141809.png 558w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-141809-200x136.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/09\/Screenshot-19.09.2018-141809-500x341.png 500w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;SFE_BMP180.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;Wire.h&gt;<\/span>\r\n<span style=\"color: #808080; font-style: italic;\">#include &lt;TM1637Display.h&gt;<\/span>\r\n\u00a0\r\nSFE_BMP180 h;\r\nTM1637Display display<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>, <span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ CLK,DIO<\/span>\r\n\u00a0\r\ndouble t,p;\r\nuint8_t <span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #66cc66;\">]<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span>,<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">}<\/span>;\r\n<span style=\"color: #0066cc;\">int<\/span> s,p1,x,t1;\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\nh.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\ndisplay.<span style=\"color: #006600;\">setBrightness<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u044f\u0440\u043a\u043e\u0441\u0442\u044c TM1637 0-7<\/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<span style=\"color: #0066cc;\">int<\/span> i = h.<span style=\"color: #006600;\">startTemperature<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\ndelay<span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/span>\r\nh.<span style=\"color: #006600;\">getTemperature<\/span><span style=\"color: #66cc66;\">(<\/span>t<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/span>\r\nt1=t;\r\n\u00a0\r\ni = h.<span style=\"color: #006600;\">startPressure<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c 0-3<\/span>\r\ndelay<span style=\"color: #66cc66;\">(<\/span>i<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432\u0440\u0435\u043c\u044f \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f<\/span>\r\nh.<span style=\"color: #006600;\">getPressure<\/span><span style=\"color: #66cc66;\">(<\/span>p,t<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/span>\r\np1=p<span style=\"color: #66cc66;\">\/<\/span><span style=\"color: #cc66cc;\">1.333224<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ \u0432 \u043c\u043c.\u0440\u0442.\u0441\u0442<\/span>\r\n\u00a0\r\ndelay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">1000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\ns++;\r\n\u00a0\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>s<span style=\"color: #66cc66;\">&gt;<\/span>=<span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">&amp;&amp;<\/span>s<span style=\"color: #66cc66;\">&lt;<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>=0x73;x=p1;\r\n<span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span> = display.<span style=\"color: #006600;\">encodeDigit<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">(<\/span>x<span style=\"color: #66cc66;\">\/<\/span><span style=\"color: #cc66cc;\">100<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">%<\/span>10<span style=\"color: #66cc66;\">)<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>s<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #66cc66;\">]<\/span>=0x78;x=t1;<span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">1<\/span><span style=\"color: #66cc66;\">]<\/span>=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n<span style=\"color: #b1b100;\">if<\/span><span style=\"color: #66cc66;\">(<\/span>s<span style=\"color: #66cc66;\">&gt;<\/span><span style=\"color: #cc66cc;\">9<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">{<\/span>s=<span style=\"color: #cc66cc;\">0<\/span>;<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #66cc66;\">]<\/span> = display.<span style=\"color: #006600;\">encodeDigit<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">(<\/span>x<span style=\"color: #66cc66;\">\/<\/span><span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">%<\/span>10<span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #66cc66;\">]<\/span> = display.<span style=\"color: #006600;\">encodeDigit<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">(<\/span>x<span style=\"color: #66cc66;\">%<\/span>10<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">%<\/span>10<span style=\"color: #66cc66;\">)<\/span>;\r\ndisplay.<span style=\"color: #006600;\">setSegments<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #0066cc;\">data<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n<\/pre>\n<blockquote>\n<p style=\"text-align: center;\"><strong>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 &#8212;\u00a0<a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/TM1637Display.zip\">TM1637Display.zip<\/a><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/72589347098324.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-46765 aligncenter\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/72589347098324.png\" alt=\"\" width=\"174\" height=\"140\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/72589347098324.png 518w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/72589347098324-200x161.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/07\/72589347098324-500x403.png 500w\" sizes=\"auto, (max-width: 174px) 100vw, 174px\" \/><\/a><\/strong><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u043e\u0434\u0443\u043b\u044c BMP180\u00a0 \u2014 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0440\u043e\u0433\u0438\u043c \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u044b\u043c \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u044c \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0435\u0439\u00a0\u0441\u0440\u0435\u0434\u044b. \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f BMP180: \u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 3.3 &#8230; 5 \u0412 \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0442\u043e\u043a: 5 \u043c\u043a\u0410 \u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f: 300hPa .. 1100hPa \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f: 0,1 hPa \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b: 0,1\u00b0\u0421 \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: I2C \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Arduino Nano: A4\u00a0 SDA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":49744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239,17],"tags":[],"class_list":["post-49743","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-17"],"views":5789,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49743","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=49743"}],"version-history":[{"count":9,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49743\/revisions"}],"predecessor-version":[{"id":111514,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/49743\/revisions\/111514"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/49744"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=49743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=49743"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=49743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}