From 5659e4c0866aa2ef5c7e01fef5a4a5291eb0a96b Mon Sep 17 00:00:00 2001 From: miguel5612 Date: Sat, 28 Mar 2020 08:43:30 -0500 Subject: [PATCH] Moved comment --- examples/MQ-4-ALL/MQ-4-ALL.ino | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/MQ-4-ALL/MQ-4-ALL.ino b/examples/MQ-4-ALL/MQ-4-ALL.ino index 0bc6dcf..5c6f9db 100644 --- a/examples/MQ-4-ALL/MQ-4-ALL.ino +++ b/examples/MQ-4-ALL/MQ-4-ALL.ino @@ -38,15 +38,6 @@ void setup() { //Set math model to calculate the PPM concentration and the value of constants MQ4.setRegressionMethod(1); //_PPM = a*ratio^b - /* - Exponential regression: - Gas | a | b - LPG | 3811.9 | -3.113 - CH4 | 1012.7 | -2.786 - CO | 200000000000000 | -19.05 - Alcohol| 60000000000 | -14.01 - smoke | 30000000 | -8.308 - */ @@ -91,6 +82,15 @@ void setup() { void loop() { MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin + /* + Exponential regression: + Gas | a | b + LPG | 3811.9 | -3.113 + CH4 | 1012.7 | -2.786 + CO | 200000000000000 | -19.05 + Alcohol| 60000000000 | -14.01 + smoke | 30000000 | -8.308 + */ MQ4.setA(3811.9); MQ4.setB(-3.113); // Configurate the ecuation values to get CH4 concentration float LPG = MQ4.readSensor(); // Sensor will read PPM concentration using the model and a and b values setted before or in the setup