PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
PASCO2PulseIno Class Reference

#include <pas-co2-pulse-ino.hpp>

Inheritance diagram for PASCO2PulseIno:
Collaboration diagram for PASCO2PulseIno:

Public Member Functions

 PASCO2PulseIno (uint8_t pwmPin, uint8_t intPin=GPIOIno::unusedPin, uint8_t power3V3Pin=GPIOIno::unusedPin, uint8_t power12VPin=GPIOIno::unusedPin, uint8_t pwmSelPin=GPIOIno::unusedPin)
 PAS CO2 Pulse Arduino Constructor. More...
 
 ~PASCO2PulseIno ()
 PAS CO2 Pulse Arduino Destructor. More...
 
Error_t begin ()
 Begins the sensor. More...
 
Error_t end ()
 Ends the sensor. More...
 
- Public Member Functions inherited from PASCO2Pulse
 PASCO2Pulse (PWM *const pwm, Timer *const timer=nullptr, pasco2::GPIO *const interrupt=nullptr, pasco2::GPIO *const power3V3=nullptr, pasco2::GPIO *const power12V=nullptr, pasco2::GPIO *const pwmSelect=nullptr)
 PAS CO2 Pulse Constructor. More...
 
virtual ~PASCO2Pulse ()
 PAS CO2 Pulse Destructor. More...
 
Error_t enable ()
 Enables the sensor. More...
 
Error_t disable ()
 Disables the sensor. More...
 
Error_t startMeasure (void(*cback)(void *)=nullptr)
 Triggers the internal measuring of the sensor. More...
 
Error_t stopMeasure ()
 Stops the internal measuring of the sensor. More...
 
Error_t getCO2 (int16_t &co2ppm)
 Gets the CO2 concentration measured. More...
 
Error_t reset ()
 Resets the sensor. More...
 

Constructor & Destructor Documentation

◆ PASCO2PulseIno()

PASCO2PulseIno::PASCO2PulseIno ( uint8_t  pwmPin,
uint8_t  intPin = GPIOIno::unusedPin,
uint8_t  power3V3Pin = GPIOIno::unusedPin,
uint8_t  power12VPin = GPIOIno::unusedPin,
uint8_t  pwmSelPin = GPIOIno::unusedPin 
)

PAS CO2 Pulse Arduino Constructor.

Mandatory arguments:

  • The PWM pin needs to be provided

Optional arguments:

  • All other pins instances.

Most of the GPIO will be fixed by hardware. In particular those enabling the sensor main power and the emitter power. They are part of the sensor library to provide potential absolute control by software. The hardware interface and its features, are also provided in the library. But it can be as well handled externally

Parameters
[in]pwmPinPWM pin.
[in]intPinInterrupt pin. Default is UnusedPin
[in]power3V3PinPower 3V3 pin. Default is UnusedPin
[in]power12VPinPower 12V pin. Default is UnusedPin
[in]pwmSelPinPWM select pin. Default is UnusedPin
Precondition
None

◆ ~PASCO2PulseIno()

PASCO2PulseIno::~PASCO2PulseIno ( )

PAS CO2 Pulse Arduino Destructor.

It disables the sensor and deletes all the dynamically created PAL instances in the constructor

Precondition
None
Here is the call graph for this function:

Member Function Documentation

◆ begin()

Error_t PASCO2PulseIno::begin ( )
inline

Begins the sensor.

Note
Optional call. The sensor initializes and enables the sensor directly in the rest of API calls.
Returns
PAS CO2 error code
Return values
OKif success
INTF_ERRORif interface error
IC_POWERON_ERRORif power-on error
Here is the call graph for this function:

◆ end()

Error_t PASCO2PulseIno::end ( )
inline

Ends the sensor.

Note
Optional call. The sensor initializes and enables the sensor directly in the rest of API calls.
Returns
PAS CO2 error code
Return values
OKif success
INTF_ERRORif interface error
Here is the call graph for this function:

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