A library for the MQ2 sensor. Based on https://github.com/labay11 and http://sandboxelectronics.com/?p=165

Dependents:   mq2_example mq2_midtermproject ECE595_Group9_FinalProject mq2_example ... more

Revision:
7:944051b30179
Parent:
5:8b7ba76a7a76
--- a/MQ2.h	Fri Oct 06 08:58:43 2017 +0000
+++ b/MQ2.h	Wed Nov 08 10:43:37 2017 +0000
@@ -3,7 +3,7 @@
 
 #include "mbed.h"
 
-#define RL_VALUE                    5                                           //define the load resistance on the board, in kilo ohms
+#define RL_VALUE                    1                                           //define the load resistance on the board, in kilo ohms
 #define RO_DEFAULT                  10                                          //Ro is initialized to 10 kilo ohms
 #define RO_CLEAN_AIR_FACTOR         9.83f                                       //RO_CLEAR_AIR_FACTOR=(Sensor resistance in clean air)/RO, which is derived from the chart in datasheet
 #define CALIBARAION_SAMPLE_TIMES    5                                           //define how many samples you are going to take in the calibration phase