# ESP-IDF Component: *esp-pms*
[](https://github.com/espressif/esp-idf) [](LICENSE) 
ESP-IDF component for Plantower PMSX003 air quality sensors.
## Available sensors support
| Sensor Model | Status |
|--------------|-----------------------------------------------------------------------|
| PMS1003 |  |
| PMS3003 |  |
| PMS5003 |  |
| PMS5003T |  |
| PMS5003ST |  |
| PMS6003 |  |
| PMS7003 |  |
| PMS9003M |  |
| PMSA003 |  |
| PMSX003-N |  * |
\* unverified, no available datasheet
## Setup
Clone this repository in your project **components directory** (or create one if it is missing):
```Shell
cd ~/esp-idf-projects/myproject/components
git clone https://github.com/petrovgp/esp-pms.git
```
Add components directory to **project main CMakeLists.txt**:
```CMake
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS /home/user/esp-idf-projects/myproject/components)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(myproject)
```
## Example usage
Two examples are provided with this component:
- Active queue - sensor usage in active mode with FreeRTOS queues
- Passive sleep - sensor usage in passive mode with sleep state
## License
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
idf.py add-dependency "petrovgp/esp-pms^1.0.0"