I used an Arduino Micro and just used your example code and connected the sensor like this:
- 5V (Arduino) to Vin (MH-Z19B)
- GND to GND
- Rx (Arduino) to Tx (MH-Z19B)
- Tx (Arduino) to Rx (MH-z19B)
Unfortunately, I got this Error:

I changed the value of the rx_pin and tx_pin like this:
#define RX_PIN 10
#define TX_PIN 11
When I look at the Sensor, I can see the IR light turning on every 2 seconds or so. On the arduino, the tx light flashes on and of, but the rx light is permanentely of.
What can I do?
I used an Arduino Micro and just used your example code and connected the sensor like this:
Unfortunately, I got this Error:

I changed the value of the rx_pin and tx_pin like this:
#define RX_PIN 10
#define TX_PIN 11
When I look at the Sensor, I can see the IR light turning on every 2 seconds or so. On the arduino, the tx light flashes on and of, but the rx light is permanentely of.
What can I do?