/*Push Button Shield ExampleThis example shows an application on 1Sheeld's push button shield.By using this example, you can turn on the LED on pin 13when you press the app's push button.OPTIONAL:To reduce the library compiled size and limit its memory usage, youcan specify which shields you want to include in your sketch bydefining 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. */intledPin=13;Stringstatus="posted by 1sheeld testing";voidsetup(){/* Start communication. */OneSheeld.begin();/* Set the LED pin as output. */pinMode(ledPin,OUTPUT);}voidloop(){/* 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);}}voidpost(){switch(0){delay(1100);case0:TextToSpeech.say("welcome to maker mela");delay(1100);case1:TextToSpeech.say("please wait ");delay(1100);case2:TextToSpeech.say(" we will take your photo");delay(1100);case3:TextToSpeech.say("Smile Please");delay(1100);}Camera.setFlash(ON);// Camera.frontCapture();Camera.rearCapture();delay(200);Facebook.postLastPicture(status,0/1);switch(0){delay(1500);case0:TextToSpeech.say("photo was uploaded");delay(1200);case1:TextToSpeech.say(" on Facebook ");delay(1200);case2:TextToSpeech.say(" Thanks a lot ");delay(1200);case3:TextToSpeech.say(" Have a Nice Day");delay(1200);}}
Comments
Please log in or sign up to comment.