30 lines
386 B
C++

/// © MiroZ 2024
#ifndef __BMP280_H__
#define __BMP280_H__
#include <Wire.h>
#include <BMP280_DEV.h>
struct BMP_DATA
{
float temp;
float pressure;
};
class Bmp280
{
protected:
BMP280_DEV * m_sensor;
TwoWire & m_bus;
bool m_operational = false;
public:
Bmp280(TwoWire & bus);
bool init();
bool read(float & temp, float & pressure);
};
#endif