Project tutorial
Motion activated SMS Shield- Tutorial

Motion activated SMS Shield- Tutorial

Send an SMS every time something moves in your room

  • 4,234 views
  • 2 comments
  • 5 respects

Components and supplies

About this project

http://www.youtube.com/watch?v=zj44N8mDYm0
Warning: embedding parts within the project story has been deprecated. To edit, remove or add more parts, go to the "Hardware" tab. To remove this list from the story, click on it to trigger the context menu, then click the trash can button (this won't delete it from the "Hardware" tab).
A000066 iso both
Arduino UNO & Genuino UNO
Comment
Screen shot 2019 03 20 at 2 38 27 pm fqndazqcx1
1Sheeld
Comment
13285 01
PIR Motion Sensor (generic)
Comment
12002 04
Breadboard (generic)
Comment
09590 01
LED (generic)
Comment
11026 02
Jumper wires (generic)
Comment
Untitled file

Warning: Embedding code files within the project story has been deprecated. To edit this file or add more files, go to the "Software" tab. To remove this file from the story, click on it to trigger the context menu, then click the trash can button (this won't delete it from the "Software" tab).

//1sheeld.com for the steps on adding the libraries to your arduino program

#include <OneSheeld.h> 
int ledPin = 13;                // choose the pin for the LED
int inputPin = 2;               // choose the input pin (for PIR sensor)
int PIR = LOW;             
int val = 0;                    

void setup() {
  pinMode(ledPin, OUTPUT);      // declare LED as output
  pinMode(inputPin, INPUT);     // declare sensor as input
   OneSheeld.begin(); 
}

void loop(){
  val = digitalRead(inputPin);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    digitalWrite(ledPin, HIGH);  // turn LED ON   
    delay(150);

    if (PIR == LOW) {
       SMS.send("0123456789","Motion DETECTED");  // change number with your own here
       PIR = HIGH;
    }
  } else {
    digitalWrite(ledPin, LOW); // turn LED OFF
        
    if (PIR== HIGH){
      PIR = LOW;
    }
  }
}


Code

file_7669.txtC/C++
//1sheeld.com for the steps on adding the libraries to your arduino program

#include <OneSheeld.h> 
int ledPin = 13;                // choose the pin for the LED
int inputPin = 2;               // choose the input pin (for PIR sensor)
int PIR = LOW;             
int val = 0;                    

void setup() {
  pinMode(ledPin, OUTPUT);      // declare LED as output
  pinMode(inputPin, INPUT);     // declare sensor as input
   OneSheeld.begin(); 
}

void loop(){
  val = digitalRead(inputPin);  // read input value
  if (val == HIGH) {            // check if the input is HIGH
    digitalWrite(ledPin, HIGH);  // turn LED ON   
    delay(150);

    if (PIR == LOW) {
       SMS.send("0123456789","Motion DETECTED");  // change number with your own here
       PIR = HIGH;
    }
  } else {
    digitalWrite(ledPin, LOW); // turn LED OFF
        
    if (PIR== HIGH){
      PIR = LOW;
    }
  }
}

Comments

Created by

Burger

Are you Burger? Claim this project and add it to your profile.

This is mine

Posted by

Amrousy
Amr Saleh
  • 3 projects
  • 51 followers

Published on

November 19, 2014

Members who respect this project

AndreayresPhoto

and 3 others

See similar projects
you might like

Similar projects you might like

My Motion Activated SMS sender

Project tutorial by Christiaan Neil Burger

  • 2,006 views
  • 0 comments
  • 5 respects

My Motion Activated Security Cam project

Project tutorial by Christiaan Neil Burger

  • 9,282 views
  • 9 comments
  • 12 respects

SMS your Home

Project tutorial by Mohamed Hassan AbdulRahman and Abdulrahman Elsharqawy

  • 5,798 views
  • 0 comments
  • 14 respects

Motion Activated Night Light

Project tutorial by Haziq Afandi

  • 3,113 views
  • 0 comments
  • 4 respects

Using SMS messages to control LED color

Project tutorial by SteiniBrodda

  • 6,972 views
  • 0 comments
  • 6 respects

Controlling Arduino by Voice (Say open to light the LED)

Project tutorial by Team Blue Hybrids

  • 3,695 views
  • 0 comments
  • 10 respects
Add projectSign up / Login