переписан полностью датчик bme и bmp

This commit is contained in:
Dmitry Borisenko
2020-12-26 01:22:43 +01:00
parent e33ec57a1e
commit ddc3a92c15
21 changed files with 307 additions and 301 deletions

View File

@@ -0,0 +1,39 @@
#pragma once
#include <Adafruit_BME280.h>
#include <Arduino.h>
#include "Global.h"
extern Adafruit_BME280* bme;
class SensorBme280;
typedef std::vector<SensorBme280> MySensorBme280Vector;
struct paramsBme {
String key;
String addr;
unsigned long interval;
float c;
};
class SensorBme280 {
public:
SensorBme280(const paramsBme& paramsTmp, const paramsBme& paramsHum, const paramsBme& paramsPrs);
~SensorBme280();
void loop();
void read();
private:
paramsBme _paramsTmp;
paramsBme _paramsHum;
paramsBme _paramsPrs;
unsigned long prevMillis;
unsigned long difference;
};
extern MySensorBme280Vector* mySensorBme280;
extern void bme280Sensor();