yasser saber
Created April 18, 2015 © CC BY-SA

AUTOMATIC Smart Siphon BY your voice

How to make AUTOMATIC Smart Siphon "flasher" thanks you on Facebook when if the smartphone's mic reports a certain noise level

IntermediateWork in progress689
AUTOMATIC  Smart Siphon BY your voice

Things used in this project

Hardware components

SERVO MOTOR Standard 3.2kg.cm Plastic Gears Analog Servo FS5103B
×1
1SHEELD
×1
Arduino UNO
Arduino UNO
×1
Sew hooks
×1
Siphon flush
×1

Schematics

servo.jpg

Code

Mic,Facebook,Servo

C/C++
Simple and humorous program
By using this example, you can turn on the servo motor on pin 9 if the
smartphone's mic reports a certain noise level
So that when you finish the bathroom automatically pull Siphon through servo motor and thanks you on Facebook.
/*

Mic,facebook Shield Example

This example shows an application on 1Sheeld's mic,facebook shield .

Simple and humorous program
By using this example, you can turn on the servo motor on pin 9 if the
smartphone's mic reports a certain noise level 
So that when you finish the bathroom automatically pull Siphon through servo motor and thanks you on Facebook.

*/

/* Include 1Sheeld library. */
#include <OneSheeld.h>
#include <Servo.h>
/* A name for the LED on pin 13. */
int ledPin = 13;



Servo myservo;  // create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0;    // variable to store the servo position



void setup()
{
  /* Start communication. */
  OneSheeld.begin();
  /* Set the LED pin as output. */
  pinMode(ledPin, OUTPUT);

  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}

void loop ()
{
  /* Always check the noise level. */
  if (Mic.getValue() > 80)
  {
    /* Turn on the LED. */
    digitalWrite(ledPin, HIGH);

    /* Update your status on Facebook. */
    Facebook.post("HAMAM DONE thank you :)!");
    /* Wait for 300 ms. */
    OneSheeld.delay(300);

    myservo.write(350);



  }
  else
  {
    /* Turn off the LED. */
    digitalWrite(ledPin, LOW);
    myservo.write(0) ;
  }
}

Credits

yasser saber
2 projects • 7 followers

Comments