Twitter Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Twitter Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

Bringing twitter into your Arduino sketch. Twitter shield allows you to send tweets with only 1 line of code in your sketch.
Learn more from the examples page.
This shield is one of the social media shields. Social media shields allow you to use your Arduino board to access your favorite social media applications, using your smartphone as a channel between them.

Learn more from the social media shields tutorial.

Twitter  library allows Arduino board to post, track words, get tweets and upload pictures through 1Sheeld application.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_TWITTER_SHIELD is a key that will let you unlock the Twitter shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

“There are permissions to be granted by Android M users before they can use the Twitter shield please make sure to grant the permissions or else it may affect the application’s performance.”

Post a tweet using your account.

SYNTAX

Twitter.tweet(tweet);

RETURNS

None.

PARAMETERS

Takes text to be tweeted as array of char.

USAGE

Twitter.tweet(“tweetToBePosted”);

Post a tweet using your account.

SYNTAX

Twitter.tweet(tweet);

RETURNS

None.

PARAMETERS

Takes text to be tweeted as String object.

USAGE

String sentence = “tweetToBePosted”;
Twitter.tweet(sentence);

Send a direct message to a certain account.

SYNTAX

Twitter.sendMessage(accountName , message);

RETURNS

None.

PARAMETERS

1st Parameter takes account name as array of char.

2nd Parameter takes body message as array of char.

USAGE

Twitter.sendMessage (“accountName”,“messageBody”);

Send a direct message to a certain account.

SYNTAX

Twitter.sendMessage(accountName , message);

RETURNS

None.

PARAMETERS

1st Parameter takes account name as String object.

2nd Parameter takes body message as String object.

USAGE

String name = “accountName”;
String message = “messageBody”;
Twitter.sendMessage(name,message);

Checks if there’s a new incoming tweet.

SYNTAX

Twitter.isNewTweer( );

RETURNS

A yes “1” or no “0”;

PARAMETERS

None.

USAGE

Twitter.isNewTweet();

Posts last picture taken by your smartphone camera with the option to upload from OneSheeld folder or Camera folder.

Literals:

FROM_ONESHEELD_FOLDER “default”

FROM_CAMERA_FOLDER

SYNTAX

Twitter.tweetLastPicture (status , folderDirectory);

RETURNS

None.

PARAMETERS

1st Parameter takes text status to be posted as array of char.

2nd Parameter takes a number to upload picture from OneSheeld folder “0” or Camera folder”1″.

USAGE

Twitter.tweetLastPicture(“status to be posted on facebook along the picture” , FROM_CAMERA_FOLDER );

Posts last picture taken by your smartphone camera with the option to upload from OneSheeld folder or Camera folder.

Literals:

FROM_ONESHEELD_FOLDER “default”

FROM_CAMERA_FOLDER

SYNTAX

Twitter.tweetLastPicture (status , folderDirectory);

RETURNS

None.

PARAMETERS

1st Parameter takes text status to be posted as String object.

2nd Parameter takes a number to upload picture from OneSheeld folder “0” or Camera folder”1″.

USAGE

String status = “status to be written to facebook along the picture”;
Twitter.tweetLastPicture(status , FROM_ONESHEELD_FOLDER);

Track a certain word over the whole tweets posted by the whole globe.

SYNTAX

Twitter.trackKeyword(keywordToBeTracked);

RETURNS

None.

PARAMETERS

Takes text keyword as array of char.

USAGE

Twitter.trackKeyword(“1Sheeld”);

Track a certain word over the whole tweets posted by the whole globe.

SYNTAX

Twitter.trackKeyword(keywordToBeTracked);

RETURNS

None.

PARAMETERS

Takes text keyword as String object.

USAGE

String keyword = “1Sheeld”;
Twitter.trackKeyword(keyword);

Stop tracking the word .

SYNTAX

Twitter.untrackKeyword(keywordToBeUnTracked);

RETURNS

None.

PARAMETERS

Takes text keyword as array of char.

USAGE

Twitter.untrackKeyword(“1Sheeld”);

Stop tracking the word .

SYNTAX

Twitter.untrackKeyword(keywordToBeUnTracked);

RETURNS

None.

PARAMETERS

Takes text keyword as String object.

USAGE

String keyword = “1Sheeld”;
Twitter.untrackKeyword(keyword);

Gets the tweet with a tracked word.

SYNTAX

Twitter.getTweet( );

RETURNS

Array type of the tweet.

PARAMETERS

None.

USAGE

char* myArray = Twitter.getTweet( );

Gets the tweet with a tracked word.

SYNTAX

Twitter.getTweetAsString( );

RETURNS

String type of the tweet.

PARAMETERS

None.

USAGE

String name = Twitter.getTweetAsString();

Gets the user name who tweeted a post with a tracked word.

SYNTAX

Twitter.getUserName( );

RETURNS

Array type of of username .

PARAMETERS

None.

USAGE

char* myArray = Twitter.getUserName( );

Gets the user name who tweeted a post with a tracked word.

SYNTAX

Twitter.getUserNameAsString( );

RETURNS

String type of of username .

PARAMETERS

None.

USAGE

String name = Twitter.getUserNameAsString( );

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a tweet with a certain tracked word is sent by the application.

SYNTAX

Twitter.setOnNewTweet(&userFunctionName);

RETURNS

None.

PARAMETERS

&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE

Twitter.setOnNewTweet(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new tweet comes with the tracked word. */
void myFunction (char * userName,char * tweetText)
{
    /* Print out the phone userName and tweetTexton Terminal shield. */
    Terminal.println(userName);
    Terminal.println(tweetText);
}

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a tweet with a certain tracked word is sent by the application.

SYNTAX

Twitter.setOnNewTweet(&userFunctionName);

RETURNS

None.

PARAMETERS

&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE

Twitter.setOnNewTweet(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new tweet comes with the tracked word. */
void myFunction (String userName,String tweetText)
{
    /* Print out the phone userName and tweetTexton Terminal shield. */
    Terminal.println(userName);
    Terminal.println(tweetText);
}

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a twitter shield is selected in the application.

SYNTAX

Twitter.setOnTwitterSelect(&userFunctionName);

RETURNS

None.

PARAMETERS

&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

USAGE

Twitter.setOnTwitterSelect(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked once you select Twitter shield in the application. */
void myFunction (void)
{
  digitalWrite(pin13,HIGH);
}