36 lines
473 B
C++
36 lines
473 B
C++
/// © MiroZ 2024
|
|
|
|
#ifndef __BME68X_h__
|
|
#define __BME68X_h__
|
|
|
|
#include <bme68xLibrary.h>
|
|
|
|
#include <Wire.h>
|
|
|
|
struct GAS_MEASUREMENT
|
|
{
|
|
float resistance;
|
|
};
|
|
|
|
struct BME_DATA
|
|
{
|
|
float humidity;
|
|
uint16_t measurement_bitmask;
|
|
struct GAS_MEASUREMENT measurement[10];
|
|
};
|
|
|
|
class Bme68x
|
|
{
|
|
protected:
|
|
MyLibs::Bme68x * m_sensor = nullptr;
|
|
TwoWire & m_bus;
|
|
bool m_operational = false;
|
|
|
|
public:
|
|
Bme68x(TwoWire & bus);
|
|
bool init();
|
|
|
|
bool read(struct BME_DATA * data);
|
|
};
|
|
|
|
#endif |