Rucksikaa Raajkumar
Published © CC BY

MQ-2 Gas Sensor : A friendly introduction

A short and simple introduction about the MQ-2 Gas/ Smoke sensor module.

IntermediateFull instructions provided1 hour3,040
MQ-2 Gas Sensor : A friendly introduction

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1
Grove - Gas Sensor(MQ2)
Seeed Studio Grove - Gas Sensor(MQ2)
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×3

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver
For calibration

Story

Read more

Code

Sample code

Arduino
You can use this code to obtain the analogue readings from the MQ type sensor module
int sensor = A0;
int reading;
void setup(){
  Serial.begin(9600);
}
void loop(){
  reading = analogRead(sensor);
  Serial.println("Reading: ");
  Serial.print(reading);
}

Credits

Rucksikaa Raajkumar

Rucksikaa Raajkumar

43 projects • 93 followers
Amateur Arduino Developer. Undergraduate. YouTuber (https://www.youtube.com/c/RucksikaaRaajkumar/videos) and Blogger (Arduino Projects by R)

Comments