{"id":47046,"date":"2018-08-06T11:48:43","date_gmt":"2018-08-06T05:48:43","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=47046"},"modified":"2022-01-13T18:17:00","modified_gmt":"2022-01-13T12:17:00","slug":"bmp280-%d0%b4%d0%b0%d1%82%d1%87%d0%b8%d0%ba-%d0%b0%d1%82%d0%bc%d0%be%d1%81%d1%84%d0%b5%d1%80%d0%bd%d0%be%d0%b3%d0%be-%d0%b4%d0%b0%d0%b2%d0%bb%d0%b5%d0%bd%d0%b8%d1%8f-arduino","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=47046","title":{"rendered":"BMP280 \u2013 \u0434\u0430\u0442\u0447\u0438\u043a \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f (Arduino)"},"content":{"rendered":"<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-114719.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-47053 alignright\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-114719.png\" alt=\"\" width=\"195\" height=\"155\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-114719.png 472w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-114719-200x159.png 200w\" sizes=\"auto, (max-width: 195px) 100vw, 195px\" \/><\/a>BMP280 &#8212; \u0434\u0430\u0442\u0447\u0438\u043a \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e\u043c\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u0430\u0442\u0447\u0438\u043a \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u043d\u0430\u0434 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043c\u043e\u0440\u044f.<\/p>\n<p><strong>\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 BMP280:<\/strong><\/p>\n<ul>\n<li><strong>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f:<\/strong>\u00a0\u043e\u0442 1.71 \u0412 \u0434\u043e 3.6 \u0412<\/li>\n<li><strong>\u041c\u0430\u043a\u0441 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c I2C \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:<\/strong>\u00a03.4 \u041c\u0413\u0446<\/li>\n<li><strong>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a:<\/strong>\u00a02.7 \u043c\u043aA \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0432 1 \u0413\u0446<\/li>\n<li><strong>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/strong>\u00a0I2C, SPI (4 \u041f\u0440\u043e\u0432\u043e\u0434\u0430), SPI (3 \u041f\u0440\u043e\u0432\u043e\u0434\u0430)<\/li>\n<li><strong>\u041a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u043a\u0430:<\/strong>\u00a0\u0437\u0430\u0432\u043e\u0434\u0441\u043a\u0430\u044f<\/li>\n<li><strong>\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u0448\u0443\u043c\u0430:<\/strong>\u00a0\u0434\u043e 0.2 \u041f\u0430 (1.7 \u0441\u043c) \u0438 0.01 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/li>\n<li><strong>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f:<\/strong>\u00a0\u043e\u0442 300 hPa \u0434\u043e 1100 hPa (9000 \u043c \u0434\u043e -500 \u043c)<\/li>\n<li><strong>\u0420\u0430\u0437\u043c\u0435\u0440:<\/strong>\u00a02.5 \u043c\u043c \u0445 2.0 \u043c\u043c \u0445 0.95 \u043c\u043c<\/li>\n<\/ul>\n<p>\u0414\u0430\u0442\u0447\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e I2C \u0438 SPI, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0448\u0438\u043d\u0435 I2C.<\/p>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-110036.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47047\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-110036.png\" alt=\"\" width=\"348\" height=\"345\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-110036.png 348w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-110036-200x198.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-110036-45x45.png 45w\" sizes=\"auto, (max-width: 348px) 100vw, 348px\" \/><\/a><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0412\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0434\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li><strong><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Adafruit_Sensor.zip\">Adafruit_Sensor<\/a><\/strong><\/li>\n<li><strong> <a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Adafruit_BMP280.zip\">Adafruit_BMP280<\/a><\/strong><\/li>\n<\/ul>\n<div id=\"marketWidget\"><\/div>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043a\u0435\u0442\u0447 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442-\u0432\u0430 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0448\u0438\u043d\u0435 I2C, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043a\u0435\u0442\u0447 (\u0441\u043a\u0430\u043d\u0435\u0440 i2c):<\/p>\n<pre class=\"cpp\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #339900;\">#include &lt;Wire.h&gt;<\/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>\r\n    Wire.<span style=\"color: #007788;\">begin<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>    \r\n\u00a0\r\n    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>\r\n    <span style=\"color: #0000ff;\">while<\/span> <span style=\"color: #008000;\">(<\/span><span style=\"color: #000040;\">!<\/span>Serial<span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n    Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"<span style=\"color: #000099; font-weight: bold;\">\\n<\/span>I2C Scanner\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n<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    byte error, address<span style=\"color: #008080;\">;<\/span>\r\n    <span style=\"color: #0000ff;\">int<\/span> nDevices<span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Scanning...\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    nDevices <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span>\r\n    <span style=\"color: #0000ff;\">for<\/span><span style=\"color: #008000;\">(<\/span>address <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">8<\/span><span style=\"color: #008080;\">;<\/span> address <span style=\"color: #000080;\">&lt;<\/span> <span style=\"color: #0000dd;\">127<\/span><span style=\"color: #008080;\">;<\/span> address<span style=\"color: #000040;\">++<\/span> <span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">{<\/span>\r\n        Wire.<span style=\"color: #007788;\">beginTransmission<\/span><span style=\"color: #008000;\">(<\/span>address<span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n        error <span style=\"color: #000080;\">=<\/span> Wire.<span style=\"color: #007788;\">endTransmission<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n        <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span>error <span style=\"color: #000080;\">==<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">{<\/span>\r\n            Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"I2C device found at address 0x\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n            <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span>address<span style=\"color: #000080;\">&lt;<\/span><span style=\"color: #0000dd;\">16<\/span><span style=\"color: #008000;\">)<\/span>\r\n                Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"0\"<\/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>address,HEX<span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n            Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\" !\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n            nDevices<span style=\"color: #000040;\">++<\/span><span style=\"color: #008080;\">;<\/span>\r\n        <span style=\"color: #008000;\">}<\/span>\r\n        <span style=\"color: #0000ff;\">else<\/span> <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span>error<span style=\"color: #000080;\">==<\/span><span style=\"color: #0000dd;\">4<\/span><span style=\"color: #008000;\">)<\/span> <span style=\"color: #008000;\">{<\/span>\r\n            Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Unknow error at address 0x\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n            <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span>address<span style=\"color: #000080;\">&lt;<\/span><span style=\"color: #0000dd;\">16<\/span><span style=\"color: #008000;\">)<\/span>\r\n                Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"0\"<\/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>address,HEX<span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n        <span style=\"color: #008000;\">}<\/span> \r\n    <span style=\"color: #008000;\">}<\/span>\r\n    <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span>nDevices <span style=\"color: #000080;\">==<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008000;\">)<\/span>\r\n        Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"No I2C devices found<span style=\"color: #000099; font-weight: bold;\">\\n<\/span>\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n    <span style=\"color: #0000ff;\">else<\/span>\r\n        Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"done<span style=\"color: #000099; font-weight: bold;\">\\n<\/span>\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    delay<span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">5000<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #008000;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093206.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47050\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093206.png\" alt=\"\" width=\"460\" height=\"358\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093206.png 460w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093206-200x156.png 200w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/a><\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442-\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043a\u0430\u043a 0\u044576. \u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b\u00a0Adafruit_BMP280.h \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0443\u0441\u0442-\u0432\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0432 \u0444\u0430\u0439\u043b\u0435, \u0435\u0441\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0439.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47051\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093248.png\" alt=\"\" width=\"637\" height=\"512\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093248.png 637w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093248-200x161.png 200w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-093248-500x402.png 500w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/p>\n<pre class=\"cpp\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #339900;\">#include &lt;Wire.h&gt;<\/span>\r\n<span style=\"color: #339900;\">#include &lt;SPI.h&gt;<\/span>\r\n<span style=\"color: #339900;\">#include &lt;Adafruit_Sensor.h&gt;<\/span>\r\n<span style=\"color: #339900;\">#include &lt;Adafruit_BMP280.h&gt;<\/span>\r\n\u00a0\r\n<span style=\"color: #339900;\">#define BMP_SCK 13<\/span>\r\n<span style=\"color: #339900;\">#define BMP_MISO 12<\/span>\r\n<span style=\"color: #339900;\">#define BMP_MOSI 11 <\/span>\r\n<span style=\"color: #339900;\">#define BMP_CS 10<\/span>\r\n\u00a0\r\nAdafruit_BMP280 bmp<span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/ I2C<\/span>\r\n<span style=\"color: #666666;\">\/\/Adafruit_BMP280 bmp(BMP_CS); \/\/ hardware SPI<\/span>\r\n<span style=\"color: #666666;\">\/\/Adafruit_BMP280 bmp(BMP_CS, BMP_MOSI, BMP_MISO,  BMP_SCK);<\/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>\r\n  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>\r\n  Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span>F<span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"BMP280 test\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n  <span style=\"color: #0000ff;\">if<\/span> <span style=\"color: #008000;\">(<\/span><span style=\"color: #000040;\">!<\/span>bmp.<span style=\"color: #007788;\">begin<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span> <span style=\"color: #008000;\">{<\/span>  \r\n    Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span>F<span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Could not find a valid BMP280 sensor, check wiring!\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n    <span style=\"color: #0000ff;\">while<\/span> <span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">1<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n  <span style=\"color: #008000;\">}<\/span>\r\n<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    Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span>F<span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Temperature = \"<\/span><span style=\"color: #008000;\">)<\/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>bmp.<span style=\"color: #007788;\">readTemperature<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/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><span style=\"color: #ff0000;\">\" *C\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span>F<span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Pressure = \"<\/span><span style=\"color: #008000;\">)<\/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>bmp.<span style=\"color: #007788;\">readPressure<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/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><span style=\"color: #ff0000;\">\" Pa\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    Serial.<span style=\"color: #007788;\">print<\/span><span style=\"color: #008000;\">(<\/span>F<span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\"Approx altitude = \"<\/span><span style=\"color: #008000;\">)<\/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>bmp.<span style=\"color: #007788;\">readAltitude<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #800080;\">1013.25<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/ this should be adjusted to your local forcase<\/span>\r\n    Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #ff0000;\">\" m\"<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n\u00a0\r\n    Serial.<span style=\"color: #007788;\">println<\/span><span style=\"color: #008000;\">(<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n    delay<span style=\"color: #008000;\">(<\/span><span style=\"color: #0000dd;\">2000<\/span><span style=\"color: #008000;\">)<\/span><span style=\"color: #008080;\">;<\/span>\r\n<span style=\"color: #008000;\">}<\/span><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-47052\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-103555.png\" alt=\"\" width=\"454\" height=\"358\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-103555.png 454w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/08\/Screenshot-06.08.2018-103555-200x158.png 200w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u041f\u0430\u0441\u043a\u0430\u043b\u0435\u0439 \u0432 \u043c\u043c.\u0440\u0442.\u0441\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<blockquote>\n<p style=\"text-align: center;\"><strong>\u0420(\u043c\u043c.\u0440\u0442.\u0441\u0442) = \u0420 (Pa) \/\u00a0133.3224<\/strong><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>BMP280 &#8212; \u0434\u0430\u0442\u0447\u0438\u043a \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e, \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0441\u0442\u044c\u044e. \u041f\u043e\u043c\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0434\u0430\u0442\u0447\u0438\u043a \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438 \u0432\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u0442\u0443 \u043d\u0430\u0434 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u043c\u043e\u0440\u044f. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 BMP280: \u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f:\u00a0\u043e\u0442 1.71 \u0412 \u0434\u043e 3.6 \u0412 \u041c\u0430\u043a\u0441 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c I2C \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430:\u00a03.4 \u041c\u0413\u0446 \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a:\u00a02.7 \u043c\u043aA \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u043e\u0442\u0441\u0447\u0435\u0442\u043e\u0432 \u0432 1 \u0413\u0446 \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:\u00a0I2C, SPI (4 \u041f\u0440\u043e\u0432\u043e\u0434\u0430), SPI [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":47053,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-47046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":8044,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/47046","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=47046"}],"version-history":[{"count":5,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/47046\/revisions"}],"predecessor-version":[{"id":111539,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/47046\/revisions\/111539"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/47053"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47046"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}