Phone Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld
Arduino GSM shield via smartphone

Check your phone if there’s an incoming call and get the number of the caller so you can take certain hardware
actions, how about triggering an alarm just in case you forgot your phone in
silent mode, you don’t want to miss this particular call!

You can use it in the opposite direction as well to call a friend on a certain action from Arduino. Learn more from the example page.

This shield is one of the communication shields. Communication shields allow you to use your smartphone as a gateway between Arduino and other phones, they make it easier to communicate with your Arduino board by sending and receiving data to or from another phone. Learn more from the communication shields tutorial.

Phone  library allows your Arduino to make phone calls or receive phone calls and do certain action within these phone calls.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_PHONE_SHIELD is a key that will let you unlock the Phone 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 Phone shield please make sure to grant the permissions or else it may affect the application’s performance.”

Call a certain phone.

SYNTAX

Phone.call (phoneNumber);

RETURNS

None.

PARAMETERS

Takes number of the phone as an array of char.

USAGE

Phone.call(“phoneNumber”);

Call a certain phone.

SYNTAX

Phone.call (phoneNumber);

RETURNS

None.

PARAMETERS

Takes number of the phone as String object.

USAGE

String number= “phoneNumber” ;
Phone.call(number);

Checks if the phone is ringing.

SYNTAX

Phone.isRinging( );

RETURNS

None.

PARAMETERS

None.

USAGE

Phone.isRinging();

Gets the number calling the smartphone.

SYNTAX

Phone.getNumber( );

RETURNS

Numbers in an array of char.

PARAMETERS

None.

USAGE

char* number = Phone.getNumber();

Gets the number calling the smartphone.

SYNTAX

Phone.getNumberAsString( );

RETURNS

Numbers as String object.

PARAMETERS

None.

USAGE

String  number = Phone.getNumberAsString();

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new value is sensed and sent by the application to the Arduino.

SYNTAX

Phone.setOnCallStatusChange(&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

Phone.setOnCallStatusChange(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new call comes to smratphone. */
void myFunction (bool isPhoneRinging ,char * phoneNumber)
{
       /* Print x-y-z axis values on the Terminal Shield. */
      if(!strcmp(phoneNumber ,“XXXXXXXXX”))
       {
          /* Turn on the LED. */
          digitalWrite(ledPin,HIGH);
       }
}

Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new value is sensed and sent by the application to the Arduino.

SYNTAX

Phone.setOnCallStatusChange(&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

Phone.setOnCallStatusChange(&myFunction);
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new call comes to smratphone. */
void myFunction(bool isPhoneRinging ,String phoneNumber)
{
      String number = "XXXXXXXXXX";
       /* Print x-y-z axis values on the Terminal Shield. */
      if(phoneNumber == number)
       {
          /* Turn on the LED. */
          digitalWrite(ledPin,HIGH);
       }
}