9
Implementation:
You have three methods you can use this module. The first method is to use this
device as a standalone module where, when gas is detected in the MQ2 the
buzzer will make a noise and D1 will light up to inform you that Methane, Butane
or LPG has been detected. You may use the potentiometer R3 to adjust the
sensitivity of the detector.
Note: Do not expose the sensor to open flame!
The second method to use this module is to connect the third pin to Arduino
analog pin and use analog read sketch to read the values from this module.
This example code can be found in the Arduino IDE under
File>Examples>Basics>AnalogReadSerial.
The third method to use this module is to connect the fourth pin to Arduino
digital pin and use digital read sketch to read when the sensor is active high or
active low.
This example code can be found in the Arduino IDE under
File>Examples>Basics>DigitalReadSerial.