File SEN5X_API.cpp
FileList > firmware > SEN5X_API.cpp
Go to the source code of this file
Implementation of functions for reading and initializing the SEN5X sensor. More...
#include <SensirionI2CSen5x.h>#include "SEN5X_API.h"#include "Debug.h"
Public Attributes
| Type | Name |
|---|---|
| SensirionI2CSen5x | sen5x Instance of Sensirion library object for the SEN5X sensor. |
| float | sen5x_hum = 0.0fRelative humidity. |
| float | sen5x_mc_10p0 = 0.0fPM10 mass concentration. |
| float | sen5x_mc_1p0 = 0.0fPM1.0 mass concentration. |
| float | sen5x_mc_2p5 = 0.0fPM2.5 mass concentration. |
| float | sen5x_mc_4p0 = 0.0fPM4.0 mass concentration. |
| float | sen5x_nox = 0.0fNitrogen Oxides (NOx) index. |
| float | sen5x_temp = 0.0fTemperature. |
| float | sen5x_voc = 0.0fVolatile Organic Compounds (VOC) index. |
Public Functions
| Type | Name |
|---|---|
| void | sen5x_inicializar (void) Initializes the SEN5X sensor. |
| bool | sen5x_leer (void) Reads the latest data measured by the sensor and updates the global variables sen5x_* with the new values. |
Macros
| Type | Name |
|---|---|
| define | DEBUG_LEVEL [**DEBUG\_SEN5X**](Debug_8h.md#define-debug_sen5x)Redefinition of debug level for this source file. |
| define | DEBUG_TAG "SEN5X\_API"Tag when sending debug messages. |
Detailed Description
Author:
[ALD-DSL/ATARI_RESEARCH_LAB]
Date:
[2024-07-22/2025-10-15]
Version:
2.0
Copyright:
GNU General Public License version 3 or later
Note:
This module is an abstraction layer over the SensirionI2CSen5x library.
Public Attributes Documentation
variable sen5x
Instance of Sensirion library object for the SEN5X sensor.
variable sen5x_hum
Relative humidity.
variable sen5x_mc_10p0
PM10 mass concentration.
variable sen5x_mc_1p0
PM1.0 mass concentration.
variable sen5x_mc_2p5
PM2.5 mass concentration.
variable sen5x_mc_4p0
PM4.0 mass concentration.
variable sen5x_nox
Nitrogen Oxides (NOx) index.
variable sen5x_temp
Temperature.
variable sen5x_voc
Volatile Organic Compounds (VOC) index.
Public Functions Documentation
function sen5x_inicializar
Initializes the SEN5X sensor.
Searches for the sensor on the I2C bus, resets it, and starts measurements.
function sen5x_leer
Reads the latest data measured by the sensor and updates the global variables sen5x_* with the new values.
Returns:
True if the reading was successful
Macro Definition Documentation
define DEBUG_LEVEL
Redefinition of debug level for this source file.
define DEBUG_TAG
Tag when sending debug messages.
The documentation for this class was generated from the following file firmware/SEN5X_API.cpp