用于MH-Z19 / MH-Z19B CO2传感器的Arduino库。 MHZ19 该库使用软件或硬件串行与传感器进行通信。 使用MHZ19,您可以获取CO2,温度和精度值(请参见示例)。 联系 传感器 Arduino板 文 5伏 地线 地线 Tx 接收 接收 Tx 使用SoftwareSerial库时,应在构造函数中定义RX和TX引脚,如下所示: SoftwareSerial ss ( 13...
MH-Z19 Tx to Arduino Digital Pin (Serial Rx pin) MH-Z19 Rx to Arduino Digital Pin (Serial Tx pin) other MH-Z19 pins are not used. Wiring the MH-Z19 through PWM use a PWM pin from your Arduino,ESP8266 or ESP32 Read sample source code. It's very simple !
The screenshot below displays the response timing of a synchronous readCO2() call which takes 22.1ms on an Arduino UNO: 9.4ms: Transmit 9 Bytes at 9600 baud 3.2ms: MH-Z19B to process command 9.3ms: Return response 9 Bytes at 9600 baud ...