![]() |
PMS7003 Arduino Library by Soldered 1.0.0
This is a library for the PMS7003 Board by Soldered
|
#include <PMS7003-SOLDERED.h>
Inherits SerialPM.
Public Member Functions | |
PMS7003 (int _pin1, int _pin2) | |
void | begin () |
![]() | |
SerialPM (PMS sensor) | |
SerialPM (PMS sensor, HardwareSerial &serial) | |
SerialPM (PMS sensor, uint8_t rx, uint8_t tx) | |
SerialPM (PMS sensor, Stream &serial) | |
SerialPM (PMS sensor, uint8_t rx, uint8_t tx) | |
void | init () |
STATUS | read (bool tsi_mode=false, bool truncated_num=false) |
operator bool () | |
void | sleep () |
void | wake () |
bool | has_particulate_matter () |
bool | has_number_concentration () |
bool | has_temperature_humidity () |
bool | has_formaldehyde () |
Stream * | getSerialPort () |
void | setSerialPort (Stream *serial) |
void | set_rhum_offset (float offset) |
void | set_temp_offset (float offset) |
float | get_rhum_offset () |
float | get_temp_offset () |
void | print_buffer (Stream &term, const char *fmt) |
uint16_t | waited_ms () |
uint16_t | bytes_read () |
Additional Inherited Members | ||
![]() | ||
enum | STATUS { OK , ERROR_TIMEOUT , ERROR_PMS_TYPE , ERROR_MSG_UNKNOWN , ERROR_MSG_HEADER , ERROR_MSG_BODY , ERROR_MSG_START , ERROR_MSG_LENGTH , ERROR_MSG_CKSUM } | |
![]() | ||
union { | ||
uint16_t data [9] | ||
struct { | ||
uint16_t pm [3] | ||
uint16_t nc [6] | ||
} | ||
struct { | ||
uint16_t pm01 | ||
uint16_t pm25 | ||
uint16_t pm10 | ||
uint16_t n0p3 | ||
uint16_t n0p5 | ||
uint16_t n1p0 | ||
uint16_t n2p5 | ||
uint16_t n5p0 | ||
uint16_t n10p0 | ||
} | ||
}; | ||
union { | ||
float extra [3] | ||
struct { | ||
float temp | ||
float rhum | ||
float hcho | ||
} | ||
}; | ||
STATUS | status | |
![]() | ||
enum | { serModeHardware , serModeSoftware , serModeManual } | |
![]() | ||
STATUS | trigRead () | |
bool | checkBuffer (size_t bufferLen) | |
void | decodeBuffer (bool tsi_mode, bool truncated_num) | |
uint16_t | buff2word (uint8_t n) | |
![]() | ||
Stream * | uart | |
PMS | pms | |
enum SerialPM:: { ... } | hwSerial | |
uint8_t | rx | |
uint8_t | tx | |
float | temp_offset = 0.0 | |
float | rhum_offset = 0.0 | |
uint16_t | wait_ms | |
uint8_t | buffer [BUFFER_LEN] | |
uint8_t | nbytes | |
![]() | ||
static const uint16_t | max_wait_ms = 1000 | |
static const uint8_t | BUFFER_LEN = 40 | |
|
inline |
|
inline |