etienne maillet / Mbed 2 deprecated Example_DS3231_test

Dependencies:   Adafruit_SGP30_mbed mbed CCS811 mbed-rtos ALPHASENSE Adafruit_ADS1015_ BME680

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HPMA115S0.h Source File

HPMA115S0.h

00001 #pragma once
00002 
00003 #include "mbed.h"
00004 
00005 class HPMA115S0
00006 {
00007 
00008 public:
00009     HPMA115S0(Serial* serial);
00010     void read();
00011     void start();
00012     void stop();
00013     void set_customer_coef();
00014     void read_customer_coef();
00015     void stop_autosend();
00016     void enable_autosend();
00017     void read_autosend();
00018     float getPM10();
00019     float getPM2_5();
00020 private:
00021     Serial* serial;
00022     float pm10_count;
00023     float pm2_5_count;
00024 
00025     static const uint8_t PACKET_SIZE = 32;
00026     uint8_t buffer[PACKET_SIZE];
00027 
00028 };