Hardware components | ||||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 |
Smart selfie stick
C/C++By using this example, you can controlling camera Capture with voice level if the
smartphone's mic reports a certain noise level and Post the picture on Twitter.
smartphone's mic reports a certain noise level and Post the picture on Twitter.
/*
Mic , Camera and twitter Shield
This example shows an application on 1Sheeld's mic shield control camera and Twitter shield.
By using this example, you can controlling camera Capture with voice level if the
smartphone's mic reports a certain noise level and Post the picture on Twitter.
*/
/* Include 1Sheeld library. */
#include <OneSheeld.h>
void setup()
{
/* Start communication. */
OneSheeld.begin();
}
void loop ()
{
/* Always check the noise level. */
if(Mic.getValue() > 80)
{
/* Turn on the camera flash. */
Camera.setFlash(ON);
/* Take the picture. */
Camera.rearCapture();
/* Wait for 10 seconds. */
OneSheeld.delay(10000);
/* Post the picture on Twitter. */
Twitter.tweetLastPicture("Posted by @1Sheeld");
}
}
/*
Mic and Camera Shield Example
This example shows an application on 1Sheeld's mic shield control camera and Twitter shield.
By using this example, you can controlling camera Capturer with voice level if the
smartphone's mic reports a certain noise level and Post the picture on Twitter.
*/
/* Include 1Sheeld library. */
#include <OneSheeld.h>
void setup()
{
/* Start communication. */
OneSheeld.begin();
}
void loop ()
{
/* Always check the noise level. */
if(Mic.getValue() > 80)
{
/* Turn on the camera flash. */
Camera.setFlash(ON);
/* Take the picture. */
Camera.rearCapture();
/* Wait for 10 seconds. */
OneSheeld.delay(10000);
/* Post the picture on Twitter. */
Twitter.tweetLastPicture("Posted by @1Sheeld");
}
}
Comments