Browse Source

bmp280 test

main 0.5.5-alpha.5
Hendrik Langer 4 years ago
parent
commit
4934550286
  1. 3
      platformio.ini
  2. 6
      src/main.cpp

3
platformio.ini

@ -40,6 +40,7 @@ lib_deps =
Adafruit GFX Library Adafruit GFX Library
Adafruit BME280 Library Adafruit BME280 Library
Adafruit BME680 Library Adafruit BME680 Library
Adafruit BMP280 Library
Adafruit Unified Sensor Adafruit Unified Sensor
Adafruit BusIO Adafruit BusIO
Adafruit VEML6075 Library Adafruit VEML6075 Library
@ -48,6 +49,8 @@ lib_deps =
; Nova Fitness Sds dust sensors library ; Nova Fitness Sds dust sensors library
https://github.com/lewapek/sds-dust-sensors-arduino-library.git https://github.com/lewapek/sds-dust-sensors-arduino-library.git
ArduinoJSON ArduinoJSON
; ESP8266 Influxdb
monitor_speed = 115200 monitor_speed = 115200
upload_speed = 115200 upload_speed = 115200

6
src/main.cpp

@ -22,6 +22,7 @@
#include <Adafruit_Sensor.h> #include <Adafruit_Sensor.h>
#include "Adafruit_BME280.h" #include "Adafruit_BME280.h"
#include "Adafruit_BME680.h" #include "Adafruit_BME680.h"
#include <Adafruit_BMP280.h>
#include "Adafruit_VEML6075.h" #include "Adafruit_VEML6075.h"
#include <BH1750.h> #include <BH1750.h>
@ -54,6 +55,7 @@ static constexpr uint8_t y_offset = 6;
Adafruit_BME280 bme280; // I2C (also available: hardware SPI Adafruit_BME280 bme280; // I2C (also available: hardware SPI
Adafruit_BME680 bme680; // I2C (also available: hardware SPI Adafruit_BME680 bme680; // I2C (also available: hardware SPI
Adafruit_BMP280 bmp280;
//HardwareSerial Serial2(2); //HardwareSerial Serial2(2);
SdsDustSensor sds(Serial2); SdsDustSensor sds(Serial2);
Adafruit_VEML6075 uv = Adafruit_VEML6075(); Adafruit_VEML6075 uv = Adafruit_VEML6075();
@ -758,6 +760,10 @@ void setup()
ESP_LOGE(TAG, "Could not find a valid BME680 sensor, check wiring!"); ESP_LOGE(TAG, "Could not find a valid BME680 sensor, check wiring!");
} }
if (bmp280.begin()) {
Serial.println("BMP280 found");
}
if (uv.begin()) { if (uv.begin()) {
sensors_active.uv = true; sensors_active.uv = true;

Loading…
Cancel
Save