Real-time and dynamic transduction technique for simultaneous detection of O2 and CO2