37 #include <sys/select.h> 
   38 #include <sys/types.h> 
   41 #include <mraa/uart.h> 
   43 const int MHZ16_DEFAULT_UART = 0;
 
   46 const uint8_t MHZ16_START = 0x7e;
 
   47 const uint8_t MHZ16_END   = 0x7e;
 
  109     int readData(
char *buffer, 
size_t len);
 
  145     bool getData(
int *gas, 
int *temp);
 
  154     int ttyFd() { 
return m_ttyFd; };
 
  155     int setTtyFd(
int fd) { m_ttyFd = fd; };
 
  158     mraa_uart_context m_uart;
 
API support for the Grove CO2 sensor. 
Definition: mhz16.h:75
 
MHZ16(int uart)
Definition: mhz16.cxx:34
 
void calibrateZeroPoint()
Definition: mhz16.cxx:209
 
bool verifyPacket(unsigned char *pkt)
Definition: mhz16.cxx:159
 
~MHZ16()
Definition: mhz16.cxx:62
 
bool dataAvailable(unsigned int millis)
Definition: mhz16.cxx:70
 
int writeData(char *buffer, size_t len)
Definition: mhz16.cxx:110
 
bool getData(int *gas, int *temp)
Definition: mhz16.cxx:170
 
int readData(char *buffer, size_t len)
Definition: mhz16.cxx:94
 
bool setupTty(speed_t baud=B9600)
Definition: mhz16.cxx:131