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,
int len);
167 int ttyFd() {
return m_ttyFd; };
170 mraa_uart_context m_uart;
API support for the Grove CO2 sensor.
Definition: mhz16.h:75
MHZ16(int uart)
Definition: mhz16.cxx:36
bool verifyPacket(uint8_t *pkt, int len)
Definition: mhz16.cxx:174
int writeData(char *buffer, int len)
Definition: mhz16.cxx:121
int getGas()
Definition: mhz16.cxx:223
void calibrateZeroPoint()
Definition: mhz16.cxx:233
~MHZ16()
Definition: mhz16.cxx:68
int getTemperature()
Definition: mhz16.cxx:228
bool dataAvailable(unsigned int millis)
Definition: mhz16.cxx:76
bool getData()
Definition: mhz16.cxx:186
bool setupTty(speed_t baud=B9600)
Definition: mhz16.cxx:144
int readData(char *buffer, int len)
Definition: mhz16.cxx:100