Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
PMS3003 Class Reference

Asynchronous Plantower PMS3003 particulate sensor. Call begin() and install a callback; keep the UART and driver alive while receiving. More...

#include <PMS3003.hpp>

Inheritance diagram for PMS3003:
PMS7003

Public Member Functions

 PMS3003 (SerialPort &, int pinSet, int pinReset)
 Bind the UART, SET output pin, and RESET output pin.
void begin ()
 Configure the sensor UART and control pins, then start listening.
void onReadDone (void(*func)(int32_t pm1_0_CF1, int32_t pm2_5_CF1, int32_t pm10_0_CF1, int32_t pm1_0_Atmosphere, int32_t pm2_5_Atmosphere, int32_t pm10_0_Atmosphere))
 Register notification for a complete measurement frame.

Protected Member Functions

virtual void eventSensorDataReceived ()

Protected Attributes

void(* callback )(int32_t pm1_0_CF1, int32_t pm2_5_CF1, int32_t pm10_0_CF1, int32_t pm1_0_Atmosphere, int32_t pm2_5_Atmosphere, int32_t pm10_0_Atmosphere) = NULL
SerialPort & p
const int pinSet
const int pinReset
uint8_t index = 0
uint8_t high = 0
uint16_t checkCode

Detailed Description

Asynchronous Plantower PMS3003 particulate sensor. Call begin() and install a callback; keep the UART and driver alive while receiving.

Author
Jongsoo Jeong (CoXlab)
Date
2017. 1. 31.

Member Function Documentation

◆ onReadDone()

void PMS3003::onReadDone ( void(* func )(int32_t pm1_0_CF1, int32_t pm2_5_CF1, int32_t pm10_0_CF1, int32_t pm1_0_Atmosphere, int32_t pm2_5_Atmosphere, int32_t pm10_0_Atmosphere))

Register notification for a complete measurement frame.

Parameters
funcReceives PM1.0, PM2.5, and PM10 mass concentrations in micrograms/m^3 for CF=1 and atmospheric calibration, respectively. All six values are -1 on checksum failure; nullptr disables notification.

The documentation for this class was generated from the following file: