PMS7003 particulate sensor with particle-count reporting. Use inherited begin() before receiving measurements.
More...
#include <PMS7003.hpp>
|
| struct | value_t |
| | One measurement frame. Mass concentrations are in micrograms/m^3; particle counts are cumulative counts above the indicated size per 100 mL. More...
|
|
|
| PMS7003 (SerialPort &port, int pinSet, int pinReset) |
| | Bind the sensor UART, SET pin, and RESET pin.
|
| void | onReadDone (void(*func)(value_t &)) |
| | Register a completed-frame callback; all fields are -1 on checksum failure; nullptr disables it.
|
|
| 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.
|
|
|
void(* | callback )(value_t &) = NULL |
|
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 |
PMS7003 particulate sensor with particle-count reporting. Use inherited begin() before receiving measurements.
- Author
- Jongsoo Jeong (CoXlab)
- Date
- 2018. 8. 16.
◆ eventSensorDataReceived()
| void PMS7003::eventSensorDataReceived |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ onReadDone()
| void PMS7003::onReadDone |
( |
void(* | func )(value_t &) | ) |
|
Register a completed-frame callback; all fields are -1 on checksum failure; nullptr disables it.
- Parameters
-
| func | Receives a reference to driver-owned storage reused on the next frame. Copy the value inside the callback if it must be retained. |
The documentation for this class was generated from the following file: