{"id":852,"date":"2017-06-11T20:13:28","date_gmt":"2017-06-11T17:13:28","guid":{"rendered":"http:\/\/arduinolab.pw\/?p=852"},"modified":"2021-03-21T14:22:32","modified_gmt":"2021-03-21T11:22:32","slug":"datchik-atmosfernogo-davleniya-s-gigrometrom-bme280","status":"publish","type":"post","link":"https:\/\/arduinolab.pw\/index.php\/2017\/06\/11\/datchik-atmosfernogo-davleniya-s-gigrometrom-bme280\/","title":{"rendered":"\u0414\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 \u0441 \u0433\u0438\u0433\u0440\u043e\u043c\u0435\u0442\u0440\u043e\u043c BME280"},"content":{"rendered":"<p>\u0414\u0430\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0430\u043b\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043c\u0435\u0442\u0435\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u0443\u043c\u0435\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0432\u043e\u0437\u0434\u0443\u0445\u0430.<\/p>\n<p><!--more--><\/p>\n<h3><\/h3>\n<h3>\u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0434\u0430\u0442\u0447\u0438\u043a\u0430:<\/h3>\n<p>\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d:<\/p>\n<ul>\n<li>\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b, -40&#8230;+85\u00b0C \u00b11.0<\/li>\n<li>\u0412\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438, 0&#8230;100 % \u00b13<\/li>\n<li>\n<div>\u0414\u0430\u0432\u043b\u0435\u043d\u0438\u044f, 300&#8230;1100 hPa \u00b11.0<\/div>\n<\/li>\n<li>\n<div>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u0435: 1.71V &#8212; 3.6 V<\/div>\n<\/li>\n<li>\n<div><span id=\"result_box\" class=\"short_text\" lang=\"ru\"><span class=\"\">\u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043a\u043b\u0438\u043a\u0430: <\/span>1 sec.<\/span><\/div>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/BST-BME280_DS001-10.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">\u0434\u0430\u0442\u0430\u0448\u0438\u0442\u0435<\/a>.<\/p>\n<div><\/div>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u0434\u0430\u0442\u0447\u0438\u043a, <a href=\"https:\/\/shopnow.pub\/redirect\/cpa\/o\/qpmgxdbcm0r973elwm0c69h1j530noqd\/?to=https%3A%2F%2Faliexpress.ru%2Fitem%2F32769981136.html\" target=\"_blank\" rel=\"noopener noreferrer\">BMP280<\/a>, \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 <a href=\"https:\/\/shopnow.pub\/redirect\/cpa\/o\/qpmgxdbcm0r973elwm0c69h1j530noqd\/?to=https%3A%2F%2Faliexpress.ru%2Fitem%2F32848964559.html\" target=\"_blank\" rel=\"noopener noreferrer\">BME280<\/a> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u043d\u0435\u0448\u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u0440\u043f\u0443\u0441\u043e\u043c (\u0443 BME280 \u043a\u043e\u0440\u043f\u0443\u0441 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439)<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043a Arduino:<\/h3>\n<p>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 3.3 \u0432\u043e\u043b\u044c\u0442\u0430 \u0438 \u043d\u0430 <a href=\"https:\/\/buyeasy.by\/redirect\/cpa\/o\/pvkplqb7tn7xwbi17frdhbl9rv63318q\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u0434\u0430\u043d\u043d\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435<\/a> \u043d\u0435\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a 5 \u0432\u043e\u043b\u044c\u0442\u043e\u0432\u043e\u0439 arduino \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439, \u043b\u0438\u0431\u043e <a href=\"http:\/\/ali.arduinolab.pw\/redirect\/cpa\/o\/ore3zer0y214xl63psuoaj499ej2cs5x\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u0440\u0430\u0441\u043f\u0430\u044f\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u043e\u043c \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u044f<\/a>. \u0414\u0430\u0442\u0447\u0438\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 I2C \u0438 SPI, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-856\" src=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c-268x300.jpg\" alt=\"\" width=\"268\" height=\"300\" srcset=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c-268x300.jpg 268w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c-768x861.jpg 768w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c-624x699.jpg 624w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_i2c.jpg 795w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/a>\u0412 \u0441\u043b\u0443\u0447\u0430\u0438 I2C, \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432\u044b\u0432\u043e\u0434\u044b \u0448\u0438\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a <strong>SDA<\/strong> \u0438 <strong>SCL<\/strong>.<\/p>\n<p><a href=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-857\" src=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI-268x300.jpg\" alt=\"\" width=\"268\" height=\"300\" srcset=\"https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI-268x300.jpg 268w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI-768x861.jpg 768w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI-624x699.jpg 624w, https:\/\/arduinolab.pw\/wp-content\/uploads\/2017\/06\/bme280_SPI.jpg 795w\" sizes=\"auto, (max-width: 268px) 100vw, 268px\" \/><\/a><\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0438 \u0441 SPI:<\/p>\n<ul>\n<li>\u0432\u044b\u0432\u043e\u0434 <strong>SCL<\/strong> \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a <strong>SCK<\/strong> \u0448\u0438\u043d\u044b SPI (13 \u0432\u044b\u0432\u043e\u0434 arduino UNO),<\/li>\n<li>\u0432\u044b\u0432\u043e\u0434 <strong>SDO<\/strong> \u043c\u043e\u0434\u0443\u043b\u044f \u043a <strong>MISO<\/strong> \u0448\u0438\u043d\u044b SPI (12 \u0432\u044b\u0432\u043e\u0434 arduino UNO),<\/li>\n<li>\u0432\u044b\u0432\u043e\u0434 <strong>SDA<\/strong> \u043c\u043e\u0434\u0443\u043b\u044f \u043a <strong>MOSI<\/strong> \u0448\u0438\u043d\u044b SPI (11 \u0432\u044b\u0432\u043e\u0434 arduino UNO),<\/li>\n<li>\u0432\u044b\u0432\u043e\u0434 <strong>CSB (CS)<\/strong> \u043c\u043e\u0434\u0443\u043b\u044f \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u043c \u0432\u044b\u0445\u043e\u0434\u0443 (\u0432 \u043a\u043e\u0434\u0435 \u0437\u0430\u0434\u0430\u043d 10 \u0432\u044b\u0432\u043e\u0434 arduino UNO),<\/li>\n<\/ul>\n<p>\u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f 3,3 \u0432\u043e\u043b\u044c\u0442\u0430. \u041d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 arduino (leonardo, mega) SPI \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u044a\u0435\u043c\u0435 ICSP.<\/p>\n<h3><\/h3>\n<h3>\u0421\u043e\u0444\u0442:<\/h3>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442\u00a0Adafruit <a href=\"https:\/\/github.com\/adafruit\/Adafruit_BME280_Library\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/adafruit\/Adafruit_BME280_Library<\/a><\/p>\n<p>\u041d\u0438\u0436\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430,\u00a0\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e I2C, \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043e\u043d \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442,<\/p>\n<div class=\"su-spoiler su-spoiler-style-fancy su-spoiler-icon-plus su-spoiler-closed\" data-scroll-offset=\"0\" data-anchor-in-url=\"no\"><div class=\"su-spoiler-title\" tabindex=\"0\" role=\"button\"><span class=\"su-spoiler-icon\"><\/span>bme280test<\/div><div class=\"su-spoiler-content su-u-clearfix su-u-trim\">\n<pre><span style=\"color: #7e7e7e;\">\/***************************************************************************<\/span><span style=\"color: #7e7e7e;\"> \u00a0This is a library for the BME280 humidity, temperature &amp; pressure sensor<\/span><span style=\"color: #7e7e7e;\"> \u00a0Designed specifically to work with the Adafruit BME280 Breakout<\/span><span style=\"color: #7e7e7e;\"> \u00a0----&gt; <\/span><u><span style=\"color: #7e7e7e;\">http:\/\/www.adafruit.com\/products\/2650<\/span><\/u><span style=\"color: #7e7e7e;\"> \u00a0These sensors use I2C or SPI to communicate, 2 or 4 pins are required<\/span><span style=\"color: #7e7e7e;\"> \u00a0to interface. The device's I2C address is either 0x76 or 0x77.<\/span><span style=\"color: #7e7e7e;\"> \u00a0Adafruit invests time and resources providing this open source code,<\/span><span style=\"color: #7e7e7e;\"> \u00a0please support Adafruit andopen-source hardware by purchasing products<\/span><span style=\"color: #7e7e7e;\"> \u00a0from Adafruit!<\/span><span style=\"color: #7e7e7e;\"> \u00a0Written by Limor Fried &amp; Kevin Townsend for Adafruit Industries.<\/span><span style=\"color: #7e7e7e;\"> \u00a0BSD license, all text above must be included in any redistribution<\/span><span style=\"color: #7e7e7e;\"> ***************************************************************************\/<\/span>\n\n<span style=\"color: #000000;\">#include<\/span> <span style=\"color: #434f54;\">&lt;<\/span><span style=\"color: #d35400;\">Wire<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">h<\/span><span style=\"color: #434f54;\">&gt;<\/span>\n<span style=\"color: #000000;\">#include<\/span> <span style=\"color: #434f54;\">&lt;<\/span><b><span style=\"color: #d35400;\">SPI<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">h<\/span><span style=\"color: #434f54;\">&gt;<\/span>\n<span style=\"color: #000000;\">#include<\/span> <span style=\"color: #434f54;\">&lt;<\/span><span style=\"color: #000000;\">Adafruit_Sensor<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">h<\/span><span style=\"color: #434f54;\">&gt;<\/span>\n<span style=\"color: #000000;\">#include<\/span> <span style=\"color: #434f54;\">&lt;<\/span><span style=\"color: #000000;\">Adafruit_BME280<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">h<\/span><span style=\"color: #434f54;\">&gt;<\/span>\n\n<span style=\"color: #000000;\">#define<\/span> <span style=\"color: #000000;\">BME_SCK<\/span> <span style=\"color: #000000;\">13<\/span>\n<span style=\"color: #000000;\">#define<\/span> <span style=\"color: #000000;\">BME_MISO<\/span> <span style=\"color: #000000;\">12<\/span>\n<span style=\"color: #000000;\">#define<\/span> <span style=\"color: #000000;\">BME_MOSI<\/span> <span style=\"color: #000000;\">11<\/span>\n<span style=\"color: #000000;\">#define<\/span> <span style=\"color: #000000;\">BME_CS<\/span> <span style=\"color: #000000;\">10<\/span>\n\n<span style=\"color: #000000;\">#define<\/span> <span style=\"color: #000000;\">SEALEVELPRESSURE_HPA<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1013.25<\/span><span style=\"color: #000000;\">)<\/span>\n\n<span style=\"color: #000000;\">Adafruit_BME280<\/span> <span style=\"color: #000000;\">bme<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ I2C<\/span>\n<span style=\"color: #434f54;\">\/\/Adafruit_BME280 bme(BME_CS); \/\/ hardware SPI<\/span>\n<span style=\"color: #434f54;\">\/\/Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); \/\/ software SPI<\/span>\n\n<span style=\"color: #00979c;\">unsigned<\/span> <span style=\"color: #00979c;\">long<\/span> <span style=\"color: #000000;\">delayTime<\/span><span style=\"color: #000000;\">;<\/span>\n\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #5e6d03;\">setup<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">begin<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">9600<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">F<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"BME280 test\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<span style=\"color: #00979c;\">bool<\/span> <span style=\"color: #d35400;\">status<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0\n \u00a0\u00a0\u00a0<span style=\"color: #434f54;\">\/\/ default settings<\/span>\n \u00a0\u00a0\u00a0<span style=\"color: #d35400;\">status<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">bme<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">begin<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<span style=\"color: #5e6d03;\">if<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #434f54;\">!<\/span><span style=\"color: #d35400;\">status<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"Could not find a valid BME280 sensor, check wiring!\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #5e6d03;\">while<\/span> <span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">1<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">}<\/span>\n \u00a0\u00a0\u00a0\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"-- Default Test --\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">delayTime<\/span> <span style=\"color: #434f54;\">=<\/span> <span style=\"color: #000000;\">1000<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<span style=\"color: #d35400;\">delay<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">100<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span> <span style=\"color: #434f54;\">\/\/ let sensor boot up<\/span>\n<span style=\"color: #000000;\">}<\/span>\n\n\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #5e6d03;\">loop<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span> \n \u00a0\u00a0\u00a0<span style=\"color: #000000;\">printValues<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<span style=\"color: #d35400;\">delay<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">delayTime<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n<span style=\"color: #000000;\">}<\/span>\n\n\n<span style=\"color: #00979c;\">void<\/span> <span style=\"color: #000000;\">printValues<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #000000;\">{<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"Temperature = \"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">bme<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">readTemperature<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\" *C\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"Pressure = \"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">bme<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">readPressure<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span> <span style=\"color: #434f54;\">\/<\/span> <span style=\"color: #000000;\">100.0F<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\" hPa\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"Approx. Altitude = \"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">bme<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #000000;\">readAltitude<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">SEALEVELPRESSURE_HPA<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\" m\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\"Humidity = \"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">print<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">bme<\/span><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">readHumidity<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #00979c;\">\" %\"<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n\n \u00a0\u00a0\u00a0<b><span style=\"color: #d35400;\">Serial<\/span><\/b><span style=\"color: #434f54;\">.<\/span><span style=\"color: #d35400;\">println<\/span><span style=\"color: #000000;\">(<\/span><span style=\"color: #000000;\">)<\/span><span style=\"color: #000000;\">;<\/span>\n<span style=\"color: #000000;\">}<\/span>\n\n<\/pre>\n<\/div><\/div>\n<p>\u0432 \u043a\u043e\u0434\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, <strong>#include &lt;Adafruit_Sensor.h&gt;<\/strong> \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0431\u043e <a href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\" rel=\"noopener noreferrer\">\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e<\/a>, \u043b\u0438\u0431\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Adafruit_BME280.h<\/strong>, \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0435\u0451 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043d\u0430 \u0448\u0438\u043d\u0435 I2C, 0x76 \u0438\u043b\u0438 0x77, \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>Adafruit_BME280.h <\/strong>\u0430 \u0443\u0437\u043d\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a \u0448\u0438\u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 I2C \u0441\u043a\u0430\u043d\u0435\u0440\u0430, <a href=\"http:\/\/playground.arduino.cc\/Main\/I2cScanner\" target=\"_blank\" rel=\"noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0430 \u0442\u0443\u0442<\/a>.<\/p><div class=\"hpnay6ab4491cf365b\" ><hr>\n<!-- Yandex.RTB R-A-1793072-2 -->\n<div id=\"yandex_rtb_R-A-1793072-2\"><\/div>\n<script>window.yaContextCb.push(()=>{\n  Ya.Context.AdvManager.render({\n    renderTo: 'yandex_rtb_R-A-1793072-2',\n    blockId: 'R-A-1793072-2'\n  })\n})<\/script><\/div><style type=\"text\/css\">\r\n@media screen and (min-width: 1201px) {\r\n.hpnay6ab4491cf365b {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 993px) and (max-width: 1200px) {\r\n.hpnay6ab4491cf365b {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 769px) and (max-width: 992px) {\r\n.hpnay6ab4491cf365b {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (min-width: 768px) and (max-width: 768px) {\r\n.hpnay6ab4491cf365b {\r\ndisplay: block;\r\n}\r\n}\r\n@media screen and (max-width: 767px) {\r\n.hpnay6ab4491cf365b {\r\ndisplay: block;\r\n}\r\n}\r\n<\/style>\r\n\n<h3>\u0412\u0438\u0434\u0435\u043e:<\/h3>\n<p>https:\/\/youtu.be\/ATM9Vx5xtgo<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u0442\u0447\u0438\u043a \u0438\u0434\u0435\u0430\u043b\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u043c\u0435\u0442\u0435\u043e\u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u0443\u043c\u0435\u0435\u0442 \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u043d\u043e\u0435 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0432\u043e\u0437\u0434\u0443\u0445\u0430.<\/p>\n","protected":false},"author":1,"featured_media":898,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[7],"tags":[67,70,71,69,60,68],"class_list":["post-852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-video","tag-bme280","tag-datchik-vlazhnosti","tag-datchik-davleniya","tag-datchik-temperatury","tag-kod-iz-video","tag-modul"],"_links":{"self":[{"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/posts\/852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/comments?post=852"}],"version-history":[{"count":0,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/posts\/852\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/media\/898"}],"wp:attachment":[{"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/media?parent=852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/categories?post=852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arduinolab.pw\/index.php\/wp-json\/wp\/v2\/tags?post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}