PMS7003 Arduino Library by Soldered 1.0.0
This is a library for the PMS7003 Board by Soldered
Loading...
Searching...
No Matches
PMS7003 Class Reference

#include <PMS7003-SOLDERED.h>

Inherits SerialPM.

Public Member Functions

 PMS7003 (int _pin1, int _pin2)
 
void begin ()
 
- Public Member Functions inherited from SerialPM
 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

- Public Types inherited from SerialPM
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
}
 
- Public Attributes inherited from SerialPM
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
 
- Protected Types inherited from SerialPM
enum  { serModeHardware , serModeSoftware , serModeManual }
 
- Protected Member Functions inherited from SerialPM
STATUS trigRead ()
 
bool checkBuffer (size_t bufferLen)
 
void decodeBuffer (bool tsi_mode, bool truncated_num)
 
uint16_t buff2word (uint8_t n)
 
- Protected Attributes inherited from SerialPM
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 Protected Attributes inherited from SerialPM
static const uint16_t max_wait_ms = 1000
 
static const uint8_t BUFFER_LEN = 40
 

Constructor & Destructor Documentation

◆ PMS7003()

PMS7003::PMS7003 ( int _pin1,
int _pin2 )
inline

Member Function Documentation

◆ begin()

void PMS7003::begin ( )
inline

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