From 4934550286cc66f99896e02fe38806be057e7340 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sun, 12 Jul 2020 17:59:11 +0200 Subject: [PATCH] bmp280 test --- platformio.ini | 3 +++ src/main.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/platformio.ini b/platformio.ini index 59f4401..af07e32 100644 --- a/platformio.ini +++ b/platformio.ini @@ -40,6 +40,7 @@ lib_deps = Adafruit GFX Library Adafruit BME280 Library Adafruit BME680 Library + Adafruit BMP280 Library Adafruit Unified Sensor Adafruit BusIO Adafruit VEML6075 Library @@ -48,6 +49,8 @@ lib_deps = ; Nova Fitness Sds dust sensors library https://github.com/lewapek/sds-dust-sensors-arduino-library.git ArduinoJSON +; ESP8266 Influxdb + monitor_speed = 115200 upload_speed = 115200 diff --git a/src/main.cpp b/src/main.cpp index 8cc3628..38877d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,7 @@ #include #include "Adafruit_BME280.h" #include "Adafruit_BME680.h" +#include #include "Adafruit_VEML6075.h" #include @@ -54,6 +55,7 @@ static constexpr uint8_t y_offset = 6; Adafruit_BME280 bme280; // I2C (also available: hardware SPI Adafruit_BME680 bme680; // I2C (also available: hardware SPI +Adafruit_BMP280 bmp280; //HardwareSerial Serial2(2); SdsDustSensor sds(Serial2); Adafruit_VEML6075 uv = Adafruit_VEML6075(); @@ -757,6 +759,10 @@ void setup() } else { ESP_LOGE(TAG, "Could not find a valid BME680 sensor, check wiring!"); } + + if (bmp280.begin()) { + Serial.println("BMP280 found"); + } if (uv.begin()) { sensors_active.uv = true;