kh

Dependencies:   Adafruit_SGP30_mbed mbed CCS811 mbed-rtos ALPHASENSE Adafruit_ADS1015_ BME680

PMS7003/PMS7003.h

Committer:
etiene32
Date:
2019-03-06
Revision:
0:43070b2dfc87

File content as of revision 0:43070b2dfc87:

#pragma once

#include "mbed.h"

class PMS7003
{

public:
    PMS7003(Serial* serial);
    void read();
    float getPM10();
    float getPM2_5();
    float getPM1();
private:
    Serial* serial;
    float pm10_count;
    float pm2_5_count;
    float pm1_count;

    static const uint8_t PACKET_SIZE = 32;
    uint8_t buffer[PACKET_SIZE];

};