soumil shah
Published

Automated Selfie Booth Using 1sheeld

It automatically clicks your photo and sends it to Facebook.

BeginnerShowcase (no instructions)1 hour597
Automated Selfie Booth Using 1sheeld

Things used in this project

Hardware components

1Sheeld
1Sheeld
Arduino mega
×1

Story

Read more

Code

code

C/C++
/*

Push Button Shield Example

This example shows an application on 1Sheeld's push button shield.

By using this example, you can turn on the LED on pin 13
when you press the app's push button.

OPTIONAL:
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_PUSH_BUTTON_SHIELD
#define INCLUDE_FACEBOOK_SHIELD

#define INCLUDE_TEXT_TO_SPEECH_SHIELD

/* Include 1Sheeld library. */
#include <OneSheeld.h>

/* A name for the LED on pin 13. */
int ledPin = 13;

String status = "posted by 1sheeld testing" ;

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


void loop()
{
  /* Always check if the push button is pressed. */
  if(PushButton.isPressed())
  {
    /* Turn on the LED. */
    digitalWrite(ledPin,HIGH);
    post();
  }
  else
  {
    /* Turn on the LED. */
    digitalWrite(ledPin,LOW);
  }

}


void post()
{

   
switch(0)
{
  delay(1100);
  case 0:
  TextToSpeech.say("welcome to maker mela");
  delay(1100);
  case 1:
    TextToSpeech.say("please wait ");
    delay(1100);
     case 2:
    TextToSpeech.say(" we will take your photo");
    delay(1100);
     case 3:
    TextToSpeech.say("Smile Please");
    delay(1100);
    
  
}

    Camera.setFlash(ON);

    // Camera.frontCapture();
    Camera.rearCapture();
    delay(200);

    Facebook.postLastPicture(status , 0/1);    
    switch(0)
      {
    delay(1500);
    case 0:
   TextToSpeech.say("photo was uploaded");
    delay(1200);
    
    case 1:
    TextToSpeech.say(" on Facebook ");
    delay(1200);

        case 2:
    TextToSpeech.say(" Thanks a lot ");
    delay(1200);

     case 3:
    TextToSpeech.say(" Have a Nice Day");
    delay(1200);
    
    
    
    
  
}
}

Credits

soumil shah

soumil shah

5 projects • 7 followers
I am someone who “can adapt to any situationt and I transform unexpected obstacles into stepping stones for achievement

Comments