16 #ifndef WipperSnapper_I2C_Driver_PM25_H 17 #define WipperSnapper_I2C_Driver_PM25_h 20 #include <Adafruit_PM25AQI.h> 53 _pm25 =
new Adafruit_PM25AQI();
75 if (!
_pm25->read(&data))
78 pm10StdEvent->pm10_std = (float)data.pm10_standard;
93 if (!
_pm25->read(&data))
96 pm25StdEvent->pm25_std = (float)data.pm25_standard;
111 if (!
_pm25->read(&data))
114 pm100StdEvent->pm100_std = (float)data.pm100_standard;
122 #endif // WipperSnapper_I2C_Driver_PM25 bool getEventPM100_STD(sensors_event_t *pm100StdEvent)
Gets the PM25 sensor's PM10.0 STD reading.
Definition: WipperSnapper_I2C_Driver_PM25.h:109
bool begin()
Initializes the PM25 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_PM25.h:52
Class that provides a driver interface for the PM25 sensor.
Definition: WipperSnapper_I2C_Driver_PM25.h:28
WipperSnapper_I2C_Driver_PM25(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a PM25 sensor.
Definition: WipperSnapper_I2C_Driver_PM25.h:40
bool getEventPM25_STD(sensors_event_t *pm25StdEvent)
Gets the PM25 sensor's PM2.5 STD reading.
Definition: WipperSnapper_I2C_Driver_PM25.h:91
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
Adafruit_PM25AQI * _pm25
PM25 driver object.
Definition: WipperSnapper_I2C_Driver_PM25.h:119
uint16_t _sensorAddress
The I2C driver's unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
bool getEventPM10_STD(sensors_event_t *pm10StdEvent)
Gets the PM25 sensor's PM1.0 STD reading.
Definition: WipperSnapper_I2C_Driver_PM25.h:73
TwoWire * _i2c
Pointer to the I2C driver's Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321