Things used in this project

Schematics

Circuit diagram
Ultrasnoic%20%26%20Skype%20call.fzz

Code

Untitled fileArduino
#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

D8ca5d41c88b4cd69a31c55132ebb8f1
Manuel Miguel
2 projects • 1 follower
Electronics Designer
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog