The code just reads the voltage output by either sensor.
You convert that value to PPM after calibrating the sensor.