loading

Want to make a simple toy to check gas leaks? Want to be notified of any gas leaks? Want to impress your friends?

Then you are at the right place!

Here i'll show you how to make a simple gas leak notifier with your LinkitONE!

Step 1: What Do You Need?

1 . LinkitONE board

2. A gas stove

3. Breadboard

5. LinkitONE GSM antena

6. Battery pack

7. Relay module

8. Gas sensor (MQ5)

Step 2: Hacking the Gas Stove!

Now we'll hack into the gas stove. Search for a location where gas could leak in case of an accident, it could be a pipe connection, near the stove mesh, near a valve, or a gas meter.

We'll fix the fire sensor there to sense some fire and gas leaks!

Step 3: Connecting the Sensor

Now connect your sensor to the board. Do it tightly so that it doesnot comes out.

Step 4: Setting Up GSM and SIM Card

Set up the GSM and SIM card by inserting it into the card slot. Attach the WiFi antenna as well.

Step 5: Writing Some Code

The code is really simple here!

We're just taking soem analog readings from sensor, and processing them and then sending SMS.

CODE:

------------------------------

#include<LGSM.h>

char Num[20]="xxxxxxxxxx";

void setup() {

Serial.begin(9600); pinMode(8,INPUT);

}

void loop()

{

int re=digitalRead(9);

if(re==1) {

char text[200]="Someone At Door!";

sms.beginSMS(Num);

sms.println(text);

sms.endSMS();

}

delay(100000);

}

------------------------

Now burn this code and then lets start playing!

Step 6: Testing It Out!

Now burn the code into your arduino!

open serial monitor and see. You'll be able to see Hello world printed on your screen after every 1 second. You can increase the delay by changing the values of delay function.

Congrats! you've made your first serial communication arduino sketch!

Step 7: Final Touches!

You can hide it under your gas stove so that it doesnot look dirty!

Be careful, as its not resistive to water so make a waterproof mesh.

Hi, I'm almost sure that you hace copied the wrong code, because tjere isn't any analog read as you mentioned. I would really like to makes this project, could you upload the correct code?

About This Instructable

1,151views

32favorites

License:

More by ssarthak598:DIY Smart Home Monitoring Bottle Arduino Video Game (The DIY Gift) Is My Fridge Door Open?! 
Add instructable to: