2025-05-11 10:17:37 +01:00
|
|
|
/*
|
|
|
|
|
* Worth noting that both the AHT10 and AHT20 are supported without alteration.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-06-04 07:04:25 -05:00
|
|
|
#include "configuration.h"
|
|
|
|
|
|
2025-04-28 18:35:13 -05:00
|
|
|
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<Adafruit_AHTX0.h>)
|
2024-06-04 07:04:25 -05:00
|
|
|
|
2024-05-31 18:17:53 +02:00
|
|
|
#include "../mesh/generated/meshtastic/telemetry.pb.h"
|
|
|
|
|
#include "TelemetrySensor.h"
|
|
|
|
|
#include <Adafruit_AHTX0.h>
|
|
|
|
|
|
|
|
|
|
class AHT10Sensor : public TelemetrySensor
|
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
Adafruit_AHTX0 aht10;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
AHT10Sensor();
|
|
|
|
|
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-05-31 18:17:53 +02:00
|
|
|
};
|
2024-06-04 07:04:25 -05:00
|
|
|
|
2025-05-11 10:17:37 +01:00
|
|
|
#endif
|