Hackster is hosting Impact Spotlights: Industrial Automation. Watch the stream live on Thursday!Hackster is hosting Impact Spotlights: Industrial Automation. Stream on Thursday!
sharveshrams
Created November 3, 2022 © GPL3+

mq135 sensor to phone

mq135 sensor to phone

mq135 sensor to phone

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Jumper wires (generic)
Jumper wires (generic)
×1
mq135
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Custom parts and enclosures

img

//connect mq135 sensor A0 to arduino A0
//connect mq135 sensor GND to arduino GND
//connect mq135 sensor VCC to arduino 5v
//connect H2105 sensor GND to to arduino GND
//connect H2105 sensor RX to to arduino TX
//connect H2105 sensor TX to to arduino RX
//connect H2105 sensor VCC to to arduino 5v

Schematics

circuit

Code

code

Arduino
//including softwareSerial lib
#include <SoftwareSerial.h>
//bluetooth
SoftwareSerial bluetooth(10, 11);

void setup(){
  //starting Serial
  Serial.begin(9600);
  //Starting bluetooth
  bluetooth.begin(9600);

}
void loop(){
  //defining int ppm for output value of mq135 sensor
  int ppm = analogRead(A0);
  //sending message to bluetooth
  bluetooth.print(ppm);
  bluetooth.print(";");
  // printing it in Serial
  Serial.print("Air Quality : ");
  Serial.print(ppm);
  //delaying the time
  delay(10);
}
//connect  mq135 sensor A0 to arduino A0
//connect  mq135 sensor GND to arduino GND
//connect  mq135 sensor VCC to arduino 5v
//connect H2105 sensor GND to to arduino GND
//connect H2105 sensor RX to to arduino TX
//connect H2105 sensor TX to to arduino RX
//connect H2105 sensor VCC to to arduino 5v

Credits

sharveshrams
4 projects • 3 followers
Contact

Comments

Please log in or sign up to comment.