Surilli
Published © GPL3+

Integrate Surilli Basic M0 with MQ2 Sensor

Visualize the changing analog values on Serial Monitor of Arduino IDE by using Surilli Basic M0 with MQ2 Sensor.

BeginnerFull instructions provided15 minutes435
Integrate Surilli Basic M0 with MQ2 Sensor

Things used in this project

Hardware components

Surilli Basic
Surilli Basic
×1
Jumper wires (generic)
Jumper wires (generic)
×1
MQ2 Sensor
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Surilli Basic M0 with MQ2 Smoke Sensor

Code

SurilliBasicM0_MQ2

C/C++
const int gasPin = A0; // GAS sensor output pin to Surilli Basic M0 analog A0 pin

void setup()

{
  
    SerialUSB.begin(115200); // Initialize serial port - 115200 bps
  
}

void loop()

{
  
    SerialUSB.println(analogRead(gasPin));
    delay(1000); // Prints value every 1 sec.
   
}

Credits

Surilli

Surilli

196 projects • 62 followers
Surilli is a premiere Internet of Things centric Technology Company aimed at providing cutting edge innovative solutions.

Comments