Multichannel Gas Sensor - How to read the values (cpp file)

Hello guys, I’m doing a project and I need your help, please.

In the MultichannelGasSensor.cpp that you provide, we have some lines that calculate the actual value of the gas that we want to measure. I’ve been trying to understand the next questions for a long time but I didn’t figured out anything… The next lines are from the calcGas () funcion.



//-1.552, 1.622, the expression… Where does this expression come? I know there’s a graph on datasheet but how do you relate it?

c = pow(ratio1, -1.552)1.622;



//The ratio is Rs/R0? Where does this expression ((float)An_1/(float)A0_1
(1023.0-A0_1)/(1023.0-An_1)) come from?

ratio1 = (float)An_1/(float)A0_1*(1023.0-A0_1)/(1023.0-An_1);



//A0_1 is equal to what? I know where it comes from but what does it represent?

int A0_1 = get_addr_dta(6, ADDR_USER_ADC_CO);



//An_1 is equal to what? I know where it comes from but what does it represent?

int An_1 = get_addr_dta(CH_VALUE_CO);





Sorry for so many repetitive questions but I really need to know that in order to present my project…

Thank you :slight_smile: