mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
39 lines
696 B
C++
39 lines
696 B
C++
#pragma once
|
|
#include <Arduino.h>
|
|
|
|
#include "Adafruit_CCS811.h"
|
|
#include "Global.h"
|
|
#include "GyverFilters.h"
|
|
|
|
class SensorCcs811;
|
|
|
|
typedef std::vector<SensorCcs811> MySensorCcs811Vector;
|
|
|
|
struct paramsCcs811 {
|
|
String key;
|
|
String addr;
|
|
unsigned long interval;
|
|
float c;
|
|
};
|
|
|
|
class SensorCcs811 {
|
|
public:
|
|
SensorCcs811(const paramsCcs811& paramsCo2, const paramsCcs811& paramsPpm);
|
|
~SensorCcs811();
|
|
|
|
Adafruit_CCS811* ccs811;
|
|
|
|
void loop();
|
|
void read();
|
|
|
|
private:
|
|
paramsCcs811 _paramsCo2;
|
|
paramsCcs811 _paramsPpm;
|
|
|
|
unsigned long prevMillis;
|
|
unsigned long difference;
|
|
};
|
|
|
|
extern MySensorCcs811Vector* mySensorCcs811;
|
|
|
|
extern void ccs811Sensor(); |