Introduction
- In this article, I will explain about connecting the Gas Sensor to the Bluetooth.
- When the gas is leaked, it can automatically send the message to the app.
- We can control the gas leakage in the house.
Parts Of Lists
- Arduino Mega 2560
- Bluetooth
- Gas Sensor
- Bread Board
- Hook Up wires
Connection
Step 1
Connection from Arduino Board to the Bluetooth.
| Bluetooth | Board |
| Vcc | 5v |
| Gnd | Gnd |
| RX | TX |
| TX | RX |
Step 2
Connection from Arduino Board to the Sensor.
| Sensor | Board |
| Vcc | 5v |
| Gnd | Gnd |
| Vin | A0 |
- const int AOUTpin = 0; //the AOUT pin of the CO sensor goes into analog pin A0 of the arduino
- const int DOUTpin = 8; //the DOUT pin of the CO sensor goes into digital pin D8 of the arduino
- const int ledPin = 13; //the anode of the LED connects to digital pin D13 of the arduino
- int limit;
- int value;
- void setup()
- {
- Serial.begin(9600);
- //sets the baud rate pinMode(DOUTpin, INPUT);
- //sets the pin as an input to the arduino pinMode(ledPin, OUTPUT);
- //sets the pin as an output of the arduino
- }
- void loop()
- {
- value = analogRead(AOUTpin); //reads the analaog value from the CO sensor's AOUT pin
- limit = digitalRead(DOUTpin); //reads the digital value from the CO sensor's DOUT pin
- Serial.print("CO value: ");
- Serial.println(value); //prints the CO value
- Serial.print("Limit: ");
- Serial.print(limit); //prints the limit reached as either LOW or HIGH (above or underneath)
- delay(100);
- if (limit == HIGH)
- {
- Serial.println("Bad");
- }
- else
- {
- Serial.println("OK");
- }
- }
Explanation
- We have to build the App in the App inverter
- They can show the Gas level in the App
- When the gas is leaked, it can be used to control the gas level through the App
- When the gas is leaked, it can be printed in the Serial monitor as Bad.


Shobana JPosted Jul 8, 2016, 12:11 AM EDT
Nice share..good one
Sr KarthigaPosted Jul 5, 2016, 6:41 AM EDT
Thank you santhakumar sir
Santhakumar MunuswamyPosted Jun 24, 2016, 11:17 PM EDT
Nice share
Sr KarthigaPosted Jun 11, 2016, 5:51 PM EDT
thank you vignesh sir
Sr KarthigaPosted Jun 11, 2016, 5:51 PM EDT
thank you kumaresh sir
Sr KarthigaPosted Jun 11, 2016, 5:50 PM EDT
thank you debasis sir
Sr KarthigaPosted Jun 11, 2016, 5:50 PM EDT
thank you thiruppathi bro
Vignesh ManiTOP 100Posted Jun 11, 2016, 12:32 PM EDT
good one
Kumaresh RajalingamPosted Jun 11, 2016, 3:47 AM EDT
Good informative
Debasis SahaTOP 100Posted Jun 10, 2016, 10:14 PM EDT
Good One..
Thiruppathi RPosted Jun 10, 2016, 8:47 AM EDT
Nice Job..