user61619: I found a link on how to connect MQ-2 Gas Sensor to Arduino Uno.
http://electronicsprojectshub.com/how-to-connect-mq2-gas-sensor-to-arduino/
After I bought all the parts and tried it out, the sensor gave me this in the serial monitor

Ro: 10.81 kohm
LPG:0.00ppm    CO:0.00ppm    SMOKE:0.00ppm
LPG:0.00ppm    CO:0.00ppm    SMOKE:0.00ppm

and so on.
Here is the code I used
#include <MQ2.h>
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16,2);
int Analog_Input = A0;
int lpg, co, smoke;
MQ2 mq2(Analog_Input);

void setup(){
  pinMode(A0, INPUT);
  Serial.begin(9600);
  lcd.begin();
  lcd.backlight();
  mq2.begin();
}

void loop(){
  float* values= mq2.read(true);
  //lpg = values[0];
  lpg = mq2.readLPG();
  //co = values[1];
  co = mq2.readCO();
  //smoke = values[2];
  smoke = mq2.readSmoke();

  lcd.setCursor(0,0);
  lcd.print("LPG:");
  lcd.print(lpg);
  lcd.print(" CO:");
  lcd.print(co);
  lcd.setCursor(0,1);
  lcd.print("SMOKE:");
  lcd.print(smoke);
  lcd.print(" PPM");
  delay(1000);
}

Please help me fix it so that it can perform just the same as the video. Thanks.

user62043: First this should be like this:
float* values= mq2.read(false); //false

and then write this to be printed in the serial monitor
Serial.print('\n');
  Serial.print("LPG:");
  Serial.print(lpg);
  Serial.print(" CO:");
  Serial.print(co);

  Serial.print('\n');
  Serial.print("SMOKE:");
  Serial.print(smoke);
  Serial.print(" PPM");
  Serial.print('\n');


61619: <p>I found a link on how to connect MQ-2 Gas Sensor to Arduino Uno.</p>
<p><a href="http://electronicsprojectshub.com/how-to-connect-mq2-gas-sensor-to-arduino/" rel="nofollow noreferrer">http://electronicsprojectshub.com/how-to-connect-mq2-gas-sensor-to-arduino/</a></p>
<p>After I bought all the parts and tried it out, the sensor gave me this in the serial monitor</p>
<blockquote>
<p>Ro: 10.81 kohm</p>
<p>LPG:0.00ppm    CO:0.00ppm    SMOKE:0.00ppm</p>
<p>LPG:0.00ppm    CO:0.00ppm    SMOKE:0.00ppm</p>
</blockquote>
<p>and so on.</p>
<p>Here is the code I used</p>
<pre><code>#include &lt;MQ2.h&gt;
#include &lt;Wire.h&gt; 
#include &lt;LiquidCrystal_I2C.h&gt;

LiquidCrystal_I2C lcd(0x27, 16,2);
int Analog_Input = A0;
int lpg, co, smoke;
MQ2 mq2(Analog_Input);

void setup(){
  pinMode(A0, INPUT);
  Serial.begin(9600);
  lcd.begin();
  lcd.backlight();
  mq2.begin();
}

void loop(){
  float* values= mq2.read(true);
  //lpg = values[0];
  lpg = mq2.readLPG();
  //co = values[1];
  co = mq2.readCO();
  //smoke = values[2];
  smoke = mq2.readSmoke();

  lcd.setCursor(0,0);
  lcd.print(&quot;LPG:&quot;);
  lcd.print(lpg);
  lcd.print(&quot; CO:&quot;);
  lcd.print(co);
  lcd.setCursor(0,1);
  lcd.print(&quot;SMOKE:&quot;);
  lcd.print(smoke);
  lcd.print(&quot; PPM&quot;);
  delay(1000);
}
</code></pre>
<p>Please help me fix it so that it can perform just the same as the video. Thanks.</p>
 62043: <p>First this should be like this:</p>

<pre><code>float* values= mq2.read(false); //false
</code></pre>

<p>and then write this to be printed in the serial monitor</p>

<pre><code>Serial.print('\n');
  Serial.print("LPG:");
  Serial.print(lpg);
  Serial.print(" CO:");
  Serial.print(co);

  Serial.print('\n');
  Serial.print("SMOKE:");
  Serial.print(smoke);
  Serial.print(" PPM");
  Serial.print('\n');
</code></pre>
