Introduction: Arduino Report Robbery With a Photo on Twitter Using 1sheeld

The project is about how can you secure your home or your store with arduino and 1sheeld.

As our home and our savings are very important to us we would do anything to keep them safe and secured and as most of force entry came from breaking home windows or shop glasses as the thieves thought that the glasses are the least secured place to break in the place through we are going to make it safer than before! so don't worry no one can break through your home without getting what he deserves.


Am using a piezo electric sensor which can sense vibrations , so we can put the sensor on the home windows or shop front glass and if the vibrations exceeds a certain threshold that will means that the window or the glass is broken and a force entry might happens.

Here the 1sheeld's role will shows up where it will take a photo for the place and tweet the photo to your twitter account reporting the thief photo and a noisy buzzer will turned on to notify anyone in the around that someone is storming my place.

Finally it will send you a SMS to your mobile phone telling you that someone is breaking in your home.

*1Sheeld is a platform for Arduino that allows you to tap into your smartphone's sensors and capabilities and lets you use them in your Arduino projects. Basically, It is a hardware shield that sits on top of your Arduino board and communicates over Bluetooth to this Android app, to transfer data between it and your smartphone.

You can check all 1sheeld's tutorials which will take you from the early beginning into more and more advanced projects from that link ." http://1sheeld.com/tutorials/ "

and you can order it from here " http://1sheeld.com/tutorials/ ".

Step 1: Get the Needed Materials

1x Arduino board

1x 1sheild

1x usb cable

1x small bread board

1x piezo electric

3x jumpers

1x 10k resistance

1x android phone

Step 2: Connect the 1sheild Over the Arduino Board

Step 3: Download 1sheeld Library

You need to download and place 1sheeld library from here:-
https://github.com/Integreight/1Sheeld-Arduino-Li...

And then extract it to the location in libraries of arduino.

Step 4: Install 1sheeld App

Install 1Sheeld application on your android phone from here:-


" http://1sheeld.com/downloads/ "

Step 5: Design the Schematic of the Hardware

Step 6: Upload the Code to the Board

/*
@title : How can you report thief with a photo on twitter by arduino

@author : Ahmed Ismail

@email : ahmed.ismail3115@gmail.com

@compiler : Arduino IDE

To reduce the library compiled size and limit its memory usage, you can specify which shields you want to include in your sketch by defining CUSTOM_SETTINGS and the shields respective INCLUDE_ define.

*/


#define CUSTOM_SETTINGS

#define INCLUDE_CAMERA_SHIELD

#define INCLUDE_TWITTER_SHIELD

#define INCLUDE_BUZZER_SHIELD

#define INCLUDE_SMS_SHIELD


/* Include 1Sheeld library. */

#include <OneSheeld.h>


/* Define a boolean flag. */

boolean isMessageSent = false;


/* define the piezo electric on pin A0. */

#define piezo A0


void setup()

{

/* Start communication. */

OneSheeld.begin();

}

void loop()

{

/* put the readings of the piezo in variable named value. */

int value = analogRead(piezo);


/* Always check if the vibrations value is larger than a certain value. */

if (value > 10)

{

if (!isMessageSent)

{

/* Send the SMS. */

SMS.send("01028876652", "someone is storming your store");

/* Set the flag. */

isMessageSent = true;

}


/* Turn on the buzzer. */

Buzzer.buzzOn();


/* Turn on the camera flash. */

Camera.setFlash(ON);


/* Take the picture. */

Camera.rearCapture();


/* Wait for 10 seconds. */

OneSheeld.delay(10000);


/* Post the picture on Twitter. */

Twitter.tweetLastPicture("Catch that thief");

}


else

{

/* Turn off the buzzer. */

Buzzer.buzzOff();

/* Reset the flag. */

isMessageSent = false;

}

}

Hope you liked the project

Feel free to comment :)