From 0d6f20680637611ad2ef9dfd67d710d302846df5 Mon Sep 17 00:00:00 2001 From: miguel5612 Date: Tue, 9 Jul 2019 17:03:23 -0500 Subject: [PATCH] Updated example of MQ-2 --- examples/MQ-2/MQ-2.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/MQ-2/MQ-2.ino b/examples/MQ-2/MQ-2.ino index 45b5581..bf76371 100644 --- a/examples/MQ-2/MQ-2.ino +++ b/examples/MQ-2/MQ-2.ino @@ -47,6 +47,14 @@ void setup() { Remarks: This function use readPPM to read the value in PPM the gas in the air. ************************************************************************************/ //Read the sensor and print in serial port - int lecture = MQ2.readSensor("", true); + //Lecture will be saved in lecture variable + int lecture = MQ2.readSensor("", true); // Return LPG concentration + // Options, uncomment where you need + //int lecture = MQ2.readSensor("H2", true); // Return H2 concentration + //int lecture = MQ2.readSensor("LPG", true); // Return LPG concentration + //int lecture = MQ2.readSensor("CO", true); // Return CO concentration + //int lecture = MQ2.readSensor("Alcohol", true); // Return Alcohol concentration + //int lecture = MQ2.readSensor("Propane", true); // Return Propane concentration + //int lecture = MQ2.readSensor("Benzene", true); // Return Benzene concentration delay(400); }