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, 4:11 AM
Nice share..good one
Sr KarthigaPosted Jul 5, 2016, 10:41 AM
Thank you santhakumar sir
Santhakumar MunuswamyPosted Jun 25, 2016, 3:17 AM
Nice share
Sr KarthigaPosted Jun 11, 2016, 9:51 PM
thank you vignesh sir
Sr KarthigaPosted Jun 11, 2016, 9:51 PM
thank you kumaresh sir
Sr KarthigaPosted Jun 11, 2016, 9:50 PM
thank you debasis sir
Sr KarthigaPosted Jun 11, 2016, 9:50 PM
thank you thiruppathi bro
Vignesh ManiPosted Jun 11, 2016, 4:32 PM
good one
Kumaresh RajalingamPosted Jun 11, 2016, 7:47 AM
Good informative
Debasis SahaPosted Jun 11, 2016, 2:14 AM
Good One..
Thiruppathi RPosted Jun 10, 2016, 12:47 PM
Nice Job..