kh
Dependencies: Adafruit_SGP30_mbed mbed CCS811 mbed-rtos ALPHASENSE Adafruit_ADS1015_ BME680
Diff: HPMA115S0/HPMA115S0.h
- Revision:
- 0:43070b2dfc87
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HPMA115S0/HPMA115S0.h Wed Mar 06 14:03:41 2019 +0000 @@ -0,0 +1,28 @@ +#pragma once + +#include "mbed.h" + +class HPMA115S0 +{ + +public: + HPMA115S0(Serial* serial); + void read(); + void start(); + void stop(); + void set_customer_coef(); + void read_customer_coef(); + void stop_autosend(); + void enable_autosend(); + void read_autosend(); + float getPM10(); + float getPM2_5(); +private: + Serial* serial; + float pm10_count; + float pm2_5_count; + + static const uint8_t PACKET_SIZE = 32; + uint8_t buffer[PACKET_SIZE]; + +}; \ No newline at end of file