MQ3.update();// Update data, the arduino will be read the voltage on the analog pin
MQ3.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ3.calibrate(RatioMQ3CleanAir);
Serial.print(".");
}
MQ3.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ2.update();// Update data, the arduino will be read the voltage on the analog pin
MQ2.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ2.calibrate(RatioMQ2CleanAir);
Serial.print(".");
}
MQ2.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ3.update();// Update data, the arduino will be read the voltage on the analog pin
MQ3.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ3.calibrate(RatioMQ3CleanAir);
Serial.print(".");
}
MQ3.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ3.update();// Update data, the arduino will be read the voltage on the analog pin
MQ3.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ3.calibrate(RatioMQ3CleanAir);
Serial.print(".");
}
MQ3.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ4.update();// Update data, the arduino will be read the voltage on the analog pin
MQ4.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ4.calibrate(RatioMQ4CleanAir);
Serial.print(".");
}
MQ4.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ131.update();// Update data, the arduino will be read the voltage on the analog pin
MQ131.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ131.calibrate(RatioMQ131CleanAir);
Serial.print(".");
}
MQ131.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ135.update();// Update data, the arduino will be read the voltage on the analog pin
MQ135.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ135.calibrate(RatioMQ135CleanAir);
Serial.print(".");
}
MQ135.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ135.update();// Update data, the arduino will be read the voltage on the analog pin
MQ135.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ135.calibrate(RatioMQ135CleanAir);
Serial.print(".");
}
MQ135.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ2.update();// Update data, the arduino will be read the voltage on the analog pin
MQ2.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ2.calibrate(RatioMQ2CleanAir);
Serial.print(".");
}
MQ2.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ3.update();// Update data, the arduino will be read the voltage on the analog pin
MQ3.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ3.calibrate(RatioMQ3CleanAir);
Serial.print(".");
}
MQ3.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ303.update();// Update data, the arduino will be read the voltage on the analog pin
MQ303.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ303.calibrate(RatioMQ303CleanAir);
Serial.print(".");
}
MQ303.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ309.update();// Update data, the arduino will be read the voltage on the analog pin
MQ309.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ309.calibrate(RatioMQ309CleanAir);
Serial.print(".");
}
MQ309.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ4.update();// Update data, the arduino will be read the voltage on the analog pin
MQ4.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ4.calibrate(RatioMQ4CleanAir);
Serial.print(".");
}
MQ4.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ4.update();// Update data, the arduino will be read the voltage on the analog pin
MQ4.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ4.calibrate(RatioMQ4CleanAir);
Serial.print(".");
}
MQ4.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ4.update();// Update data, the arduino will be read the voltage on the analog pin
MQ4.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ4.calibrate(RatioMQ4CleanAir);
Serial.print(".");
}
MQ4.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ5.update();// Update data, the arduino will be read the voltage on the analog pin
MQ5.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ5.calibrate(RatioMQ5CleanAir);
Serial.print(".");
}
MQ5.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ6.update();// Update data, the arduino will be read the voltage on the analog pin
MQ6.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ6.calibrate(RatioMQ6CleanAir);
Serial.print(".");
}
MQ6.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ7.update();// Update data, the arduino will be read the voltage on the analog pin
MQ7.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ7.calibrate(RatioMQ7CleanAir);
Serial.print(".");
}
MQ7.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ8.update();// Update data, the arduino will be read the voltage on the analog pin
MQ8.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ8.calibrate(RatioMQ8CleanAir);
Serial.print(".");
}
MQ8.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ9.update();// Update data, the arduino will be read the voltage on the analog pin
MQ9.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ9.calibrate(RatioMQ9CleanAir);
Serial.print(".");
}
MQ9.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
// ISSUE 44 - MQ9 needs a low/high temperature cycle like MQ7 #44
@ -94,15 +94,15 @@ void setup() {
floatcalcR0=0;
for(inti=1;i<=10;i++)
{
MQ9.update();// Update data, the arduino will be read the voltage on the analog pin
MQ9.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ9.calibrate(RatioMQ9CleanAir);
Serial.print(".");
}
MQ9.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ3.setADC(yourA2DValue);// Update data, the arduino will be read the voltage on the analog pin
MQ3.setADC(yourA2DValue);// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ3.calibrate(RatioMQ3CleanAir);
Serial.print(".");
}
MQ3.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}
MQ4.update();// Update data, the arduino will be read the voltage on the analog pin
MQ4.update();// Update data, the arduino will read the voltage from the analog pin
calcR0+=MQ4.calibrate(RatioMQ4CleanAir);
Serial.print(".");
}
MQ4.setR0(calcR0/10);
Serial.println(" done!.");
if(isinf(calcR0)){Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply");while(1);}
if(isinf(calcR0)){Serial.println("Warning: Conection issue, R0 is infinite (Open circuit detected) please check your wiring and supply");while(1);}
if(calcR0==0){Serial.println("Warning: Conection issue found, R0 is zero (Analog pin shorts to ground) please check your wiring and supply");while(1);}