Files
arduino/src/AirGradient.h

121 lines
2.0 KiB
C
Raw Normal View History

#ifndef _AIR_GRADIENT_H_
#define _AIR_GRADIENT_H_
#include "display/oled.h"
2024-02-04 15:04:38 +07:00
#include "main/BoardDef.h"
#include "main/HardwareWatchdog.h"
#include "main/LedBar.h"
#include "main/PushButton.h"
#include "main/StatusLed.h"
#include "pms/pms5003.h"
#include "pms/pms5003t.h"
#include "s8/s8.h"
2024-02-04 15:04:38 +07:00
#include "sgp41/sgp41.h"
2024-02-06 09:38:37 +07:00
#include "sht/sht4x.h"
#include "sht/sht3x.h"
2024-02-04 15:04:38 +07:00
/**
* @brief Class with define all the sensor has supported by Airgradient. Each
* sensor usage must be init before use.
*/
class AirGradient {
public:
AirGradient(BoardType type);
/**
* @brief Plantower PMS5003 sensor
*/
PMS5003 pms5003;
2024-02-04 15:04:38 +07:00
/**
* @brief Plantower PMS5003T sensor: connect to PM1 connector on
* OPEN_AIR_OUTDOOR.
2024-02-04 15:04:38 +07:00
*/
PMS5003T pms5003t_1;
2024-02-04 15:04:38 +07:00
/**
* @brief Plantower PMS5003T sensor: connect to PM2 connector on
* OPEN_AIR_OUTDOOR.
2024-02-04 15:04:38 +07:00
*/
PMS5003T pms5003t_2;
/**
* @brief SenseAirS8 CO2 sensor
*/
S8 s8;
/**
2024-02-04 15:04:38 +07:00
* @brief SHT41 Temperature and humidity sensor
*/
2024-02-06 09:38:37 +07:00
Sht4x sht4x;
/**
* @brief SHT3x Temperature and humidity sensor
*
*/
Sht3x sht3x;
/**
2024-02-04 15:04:38 +07:00
* @brief SGP41 TVOC and NOx sensor
*
*/
Sgp41 sgp41;
/**
2024-02-04 15:04:38 +07:00
* @brief OLED Display
*
*/
Display display;
/**
* @brief Push Button
*/
PushButton button;
/**
* @brief LED
*/
StatusLed statusLed;
2024-02-04 15:04:38 +07:00
/**
* @brief RGB LED array
*
2024-02-04 15:04:38 +07:00
*/
LedBar ledBar;
/**
2024-02-04 15:04:38 +07:00
* @brief External hardware watchdog
*/
HardwareWatchdog watchdog;
2024-02-04 15:04:38 +07:00
/**
* @brief Get I2C SDA pin has of board supported
*
2024-02-04 15:04:38 +07:00
* @return int Pin number if -1 invalid
*/
int getI2cSdaPin(void);
2024-02-04 15:04:38 +07:00
/**
* @brief Get I2C SCL pin has of board supported
*
2024-02-04 15:04:38 +07:00
* @return int Pin number if -1 invalid
*/
int getI2cSclPin(void);
2024-02-04 15:04:38 +07:00
/**
* @brief Get the Board Type
*
2024-02-04 15:04:38 +07:00
* @return BoardType @ref BoardType
*/
BoardType getBoardType(void);
2024-02-04 15:04:38 +07:00
/**
* @brief Get the library version string
*
* @return String
2024-02-04 15:04:38 +07:00
*/
String getVersion(void);
private:
BoardType boardType;
};
#endif /** _AIR_GRADIENT_H_ */