Manuel Miguel
Published © MIT

Home surveillance system using skype calls

When someone enter my home the ultrasonic sensor will detect this then 1Sheeld will make a Skype call to let me watch the thief.

BeginnerFull instructions provided3,475
Home surveillance system using skype calls

Things used in this project

Schematics

Circuit diagram

Code

Untitled file

Arduino
#define CUSTOM_SETTINGS
#define INCLUDE_SKYPE_SHIELD

#include <OneSheeld.h>

const int echoPin1 = 2;
const int trigPin1 = 4;
boolean didWeCall = false;

void setup() {
  OneSheeld.begin();
  pinMode(trigPin1, OUTPUT);
  pinMode(echoPin1, INPUT);
}


void loop()
{
 long duration1, distance1;

  digitalWrite(trigPin1, LOW);
  delayMicroseconds(2);
  digitalWrite(trigPin1, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin1, LOW);

  duration1 = pulseIn(echoPin1, HIGH);
  // convert the time into a distance1
  distance1 = duration1 / 29 / 2;
  
  if(distance1 < 5 && !didWeCall)
    {
      /* Call one of your Skype's contacts. */
      Skype.call("echo123");  
      /* Set the flag. */
      didWeCall = true;
    }
}

Ultrasonic sensor trigger Skype calls

Credits

Manuel Miguel

Manuel Miguel

2 projects • 1 follower
Electronics Designer

Comments