2024-04-29 22:10:49 +12:00
|
|
|
#include "configuration.h"
|
|
|
|
|
|
2025-04-28 18:35:13 -05:00
|
|
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_BME280.h>)
|
2024-04-27 18:05:39 +12:00
|
|
|
|
2023-01-18 08:56:47 -06:00
|
|
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
2022-02-26 20:52:22 -08:00
|
|
|
#include "TelemetrySensor.h"
|
|
|
|
|
#include <Adafruit_BME280.h>
|
|
|
|
|
|
2023-10-15 02:33:45 +02:00
|
|
|
class BME280Sensor : public TelemetrySensor
|
2023-01-18 14:51:48 -06:00
|
|
|
{
|
|
|
|
|
private:
|
2022-02-26 20:52:22 -08:00
|
|
|
Adafruit_BME280 bme280;
|
|
|
|
|
|
2023-01-18 14:51:48 -06:00
|
|
|
public:
|
2022-02-26 20:52:22 -08:00
|
|
|
BME280Sensor();
|
2023-01-21 18:22:19 +01:00
|
|
|
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
|
2025-10-13 18:09:33 +02:00
|
|
|
virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;
|
2024-04-27 18:05:39 +12:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|