Mahamudul Karim KhondakerDIYables
Published © CC0

Arduino And MQ 135 Gas Sensor With Arduino Code

In this project, I have measured the components of air.

BeginnerShowcase (no instructions)139,093
Arduino And MQ 135 Gas Sensor With Arduino Code

Things used in this project

Story

Read more

Schematics

Circuit Diagram

Code

Arduino Code

Arduino
#include <LiquidCrystal.h>
int sensorValue;
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup(){  lcd.begin(16, 2);
Serial.begin(9600);                            // sets the serial port to 9600
 }
void loop(){sensorValue = analogRead(0);       // read analog input pin 0
Serial.print("AirQua=");
Serial.print(sensorValue, DEC);               // prints the value read
Serial.println(" PPM");
lcd.setCursor(0,0);
lcd.print("ArQ=");
lcd.print(sensorValue,DEC);
lcd.print(" PPM");
lcd.println("       "); 
lcd.print("  ");
delay(100);                                   // wait 100ms for next reading
}

Credits

Mahamudul Karim Khondaker

Mahamudul Karim Khondaker

43 projects • 127 followers
Completed BSc at Electrical & Electronic Engineering (EEE) From United International University. Dhaka, Bangladesh
DIYables

DIYables

0 projects • 79 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments