Interfacing of CO2 sensor module with Arduino ATMega328 through ttl

See

Serial Begin
Serial Write
Serial Available
Serial Read

If you can't use the hardware serial , consider using SoftwareSerial

(What CO2 module do you have? some have high level libraries doing all the work for you)