Updated MQ-4 example and tested

This commit is contained in:
miguel5612 2020-03-28 12:33:09 -05:00
parent 411607dd5a
commit ab77a7a4d7

View File

@ -85,7 +85,10 @@ void loop() {
//https://jayconsystems.com/blog/understanding-a-gas-sensor //https://jayconsystems.com/blog/understanding-a-gas-sensor
MQ4.setA(-0.318); MQ4.setB(1.133); // A -> Slope, B -> Intersect with X - Axis MQ4.setA(-0.318); MQ4.setB(1.133); // A -> Slope, B -> Intersect with X - Axis
float LPG = MQ4.readSensor(); // Sensor will read PPM concentration using the model and a and b values setted before or in the setup float LPG = MQ4.readSensor(); // Sensor will read PPM concentration using the model and a and b values setted before or in the setup
// exposure to 2000 ppm of LPG gas is immediately dangerous to life and health. In this section
if(LPG>=2000) Serial.println("Warning - Very high concentrations detected!");
Serial.print("| "); Serial.print(LPG); Serial.print("| "); Serial.print(LPG);
Serial.println(" |"); Serial.println(" |");