Surilli
Published © GPL3+

Integration of Surilli Basic M0 with MQ135 and 16x2 LCD

Air quality monitoring with MQ135 sensor and Surilli Basic M0 and then observing the values on your 16x2 LCD.

BeginnerFull instructions provided15 minutes602
Integration of Surilli Basic M0 with MQ135 and 16x2 LCD

Things used in this project

Hardware components

Surilli Basic
Surilli Basic
×1
MQ135 Sensor
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

16x2 LCD with Surilli Basic M0 and MQ135 Sensor

Code

MQ135_M0_LCD

C/C++
#include <LiquidCrystal.h>

int sensorValue;

const int rs = A1, en = A2, d4 = 9, d5 = 10, d6 = 11, d7 = 6;

LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup()
{  
   lcd.begin(16, 2);
   SerialUSB.begin(9600);                            // Set the serial port to 9600
   
}

void loop()
{
  
  sensorValue = analogRead(0);                      // Read analog input pin A0
  SerialUSB.print("AirQua=");
  SerialUSB.print(sensorValue, DEC);                // Prints the value read
  SerialUSB.println(" PPM");
  lcd.setCursor(0,0);
  lcd.print("  Air Quality ");
  lcd.setCursor(0,1);
  lcd.print("   ");
  lcd.print(sensorValue,DEC);
  lcd.print(" PPM");
  lcd.print("   ");
  delay(1000);                                      // Wait 1000ms for next reading
  
}

Credits

Surilli

Surilli

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

Comments