How to connect MQ-135 gas sensor using arduino with coding

By Aman kumar
Sun, 24-Nov-2019, 09:29

h

Arduino And MQ 135 Gas Sensor With Arduino Code

Arduino And MQ 135 Gas Sensor With Arduino Code © CC0

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

  • 43,367 VIEWS
  • 5 COMMENTS
  • 15 RESPECTS

COMPONENTS AND SUPPLIES

MQ 135 Gas Sensor
× 1
A000066 iso both
Arduino UNO & Genuino UNO
× 1

ABOUT THIS PROJECT

Video tutorial

CODE

Arduino CodeArduino
#include 
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

Related Updates

This site was designed with Websites.co.in - Website Builder

WhatsApp Google Map

Safety and Abuse Reporting

Thanks for being awesome!

We appreciate you contacting us. Our support will get back in touch with you soon!

Have a great day!

Are you sure you want to report abuse against this website?

Please note that your query will be processed only if we find it relevant. Rest all requests will be ignored. If you need help with the website, please login to your dashboard and connect to support

;