kh

Dependencies:   Adafruit_SGP30_mbed mbed CCS811 mbed-rtos ALPHASENSE Adafruit_ADS1015_ BME680

Committer:
etiene32
Date:
Wed Mar 06 14:03:41 2019 +0000
Revision:
0:43070b2dfc87
,hb

Who changed what in which revision?

UserRevisionLine numberNew contents of line
etiene32 0:43070b2dfc87 1 #pragma once
etiene32 0:43070b2dfc87 2
etiene32 0:43070b2dfc87 3 #include "mbed.h"
etiene32 0:43070b2dfc87 4
etiene32 0:43070b2dfc87 5 class HPMA115S0
etiene32 0:43070b2dfc87 6 {
etiene32 0:43070b2dfc87 7
etiene32 0:43070b2dfc87 8 public:
etiene32 0:43070b2dfc87 9 HPMA115S0(Serial* serial);
etiene32 0:43070b2dfc87 10 void read();
etiene32 0:43070b2dfc87 11 void start();
etiene32 0:43070b2dfc87 12 void stop();
etiene32 0:43070b2dfc87 13 void set_customer_coef();
etiene32 0:43070b2dfc87 14 void read_customer_coef();
etiene32 0:43070b2dfc87 15 void stop_autosend();
etiene32 0:43070b2dfc87 16 void enable_autosend();
etiene32 0:43070b2dfc87 17 void read_autosend();
etiene32 0:43070b2dfc87 18 float getPM10();
etiene32 0:43070b2dfc87 19 float getPM2_5();
etiene32 0:43070b2dfc87 20 private:
etiene32 0:43070b2dfc87 21 Serial* serial;
etiene32 0:43070b2dfc87 22 float pm10_count;
etiene32 0:43070b2dfc87 23 float pm2_5_count;
etiene32 0:43070b2dfc87 24
etiene32 0:43070b2dfc87 25 static const uint8_t PACKET_SIZE = 32;
etiene32 0:43070b2dfc87 26 uint8_t buffer[PACKET_SIZE];
etiene32 0:43070b2dfc87 27
etiene32 0:43070b2dfc87 28 };