To monitor the air quality within automobile cabins and ensure the safety and health of drivers and passengers, this paper designs an in-vehicle CO2sensing system capable of real-time detection and control of CO2concentration. Due to the cabin temperature changes response of CO2sensors, which can cause deviations in the detected CO2levels, a temperature compensation method is proposed to improve the system's detection accuracy and response performance. This method leverages the high computational efficiency, predictive power, and stability of multiple linear regression models, combined with the simplicity, fast computation speed, and real-time capabilities of the lookup table approach. By establishing a multiple linear regression model based on the actual values from the CO2sensor, a lookup table algorithm is generated to achieve the self-correcting temperature compensation. Experimental results demonstrate that this lookup table can accurately detect CO2concentrations and promptly initiate responsive actions, thereby preventing health risks associated with high CO2levels and enhancing driving safety.