Temp, Humidity CO2 sensor and library.

ajaved200:
yes it displayed this

ÿÿ

I have connected sensor RX -> with Arduino pin#3
and sensor TX _> with pin #2

that means you have made a hard wired connection between the hardware Serial and the software serial.
The if statement in the code should do the copying but only if there is data available on the SW serial.
the yy indicates there is nothing to read() (In fact it is ASCII char 255 or -1)