Tutorial.GSMExamplesMakeVoiceCall History

Hide minor edits - Show changes to markup

March 11, 2013, at 01:30 PM by Federico -
Changed line 166 from:
to:
Changed lines 168-281 from:
to:
Deleted lines 170-171:
Changed lines 182-183 from:
to:
March 11, 2013, at 10:41 AM by Scott Fitzgerald -
Added line 285:
Changed lines 288-298 from:
to:
February 02, 2013, at 09:05 AM by Scott Fitzgerald -
Changed lines 1-2 from:

Examples > GSM libreay

to:

Examples > GSM library

February 02, 2013, at 09:03 AM by Scott Fitzgerald -
Changed lines 39-40 from:

Create some variables for string the phone number you want to call :

to:

Create some variables to store the phone number you want to call :

Changed lines 46-47 from:

In setup, open a serial connection to the computer. You'll use this to send a phone number to the Arduino. After opening the connection, send a message to the Serial Monitor

to:

In setup, open a serial connection to the computer. You'll use this to send a phone number to the Arduino. After opening the connection, send a message to the Serial Monitor indicating the sketch has started.

Changed lines 55-56 from:

Make a local variable to track the connection status. You'll use this to keep the sketch from starting until the SIM is connected to the network :

to:

Create a local variable to track the connection status. You'll use this to keep the sketch from starting until the SIM is connected to the network :

Changed lines 113-116 from:

The number to call will be been stored in the String named remoteNumber. The voiceCall() function requires a char array. Copy the string to the array named charbuffer@@.

remoteNumber.toCharArray(charbuffer, 20);

to:

The number to call will be been stored in the String named remoteNumber. The voiceCall() function requires a char array. Copy the string to the array named charbuffer.

remoteNumber.toCharArray(charbuffer, 20);

February 02, 2013, at 08:59 AM by Scott Fitzgerald -
Changed lines 5-6 from:

This sketch connects a voice call from your GSM shield and Arduino to a remote phone number entered through the serial monitor. You'll need to attach a speaker and microphone o hear the connected phone and send your voice.

to:

This sketch connects a voice call from your GSM shield and Arduino to a remote phone number entered through the serial monitor. You'll need to attach a speaker and microphone to hear the connected phone and send your voice.

February 02, 2013, at 08:59 AM by Scott Fitzgerald -
Changed lines 86-87 from:

First, check the serial buffer to see if there is any information waiting to be read :

to:

First, check the serial buffer to see if there is any information waiting to be read. If there is, store it in a local variable :

Added lines 92-93:
  {
    char inChar = Serial.read();
Changed lines 96-97 from:

If there are ASCII digits in the buffer, you'll add them to the string you defined earlier.

to:

If the buffer holds a newline character, check to see if the number entered is less than 20 digits long (theoretically, you'll never be able to dial a number with more digits than that).

Changed lines 99-100 from:

String remoteNumber = ""; char charbuffer[20];

to:
   if (inChar == '\n')
    {
      if (remoteNumber.length() < 20)
      {
Added lines 105-106:

Print out the number you're calling to the serial monitor.

Changed lines 108-109 from:

String remoteNumber = ""; char charbuffer[20];

to:
        Serial.print("Calling to : ");
        Serial.println(remoteNumber);
        Serial.println();
Added lines 113-120:

The number to call will be been stored in the String named remoteNumber. The voiceCall() function requires a char array. Copy the string to the array named charbuffer@@.

remoteNumber.toCharArray(charbuffer, 20);

To place the call, use vcs.voiceCall(), passing it the number you wish to reach. voiceCall() returns the status of the call; a 1 means it is connected. You can check the status of the connection with getvoiceCallStatus().

To disconnect your call, send a newline character to trigger hangCall().

Changed lines 122-123 from:

String remoteNumber = ""; char charbuffer[20];

to:
        if(vcs.voiceCall(charbuffer))
        {
          Serial.println("Call Established. Enter line to end");
          while(Serial.read()!='\n' && (vcs.getvoiceCallStatus()==TALKING));          
          vcs.hangCall();
        }
Changed lines 130-131 from:
to:

Once the call has been completed, clear the variable that stored the phone number :

Changed lines 133-134 from:

String remoteNumber = ""; char charbuffer[20];

to:
        Serial.println("Call Finished");
        remoteNumber="";
        Serial.println("Enter phone number to call.");
      }
Added lines 139-140:

If the number you entered in the serial monitor is longer than 20 digits, clear the remoteNumber String and start again :

Changed lines 142-143 from:

String remoteNumber = ""; char charbuffer[20];

to:
      else
      {
        Serial.println("That's too long for a phone number. I'm forgetting it"); 
        remoteNumber = "";
      }
    } 
Added lines 150-151:

When reading information from the serial monitor, if the incoming character is not a newline or carriage return, add it to the remoteNumber String and close up the loop.

Changed lines 153-154 from:

String remoteNumber = ""; char charbuffer[20];

to:
    else
    {
      // add the latest character to the message to send:
      if(inChar!='\r')
        remoteNumber += inChar;
    }
  } 

}

Changed lines 164-169 from:

The code below is configured for use with a GSM/GPRS shield. In the variable declaration area, you need to instantiate both the GSM and GSMVoiceCall classes. Inside setup(), call GSM.begin(), with the PINNUMBER of your SIM card as parameter. GSM.begin() will return whether the shield managed to connect to the GSM network or not.

In the loop(), the input from the Serial Monitor is used to tell the GSM Shield a phone number to call to. The code waits until the call is over before performing any other actions.

To make it work, open the serial monitor, and when you see the READY message, type a phone number. Make sure the serial monitor is set to send a just newline when you press return.

to:

Once your code is uploaded, open the serial monitor. Once you see the message "Enter phone number to call", type a phone number and press "return". Make sure the serial monitor is set to only send a newline character on return.

February 02, 2013, at 08:09 AM by Scott Fitzgerald -
Changed lines 1-6 from:

Examples > Make Voice Call

Using the GSM Shield to Make Calls

 This sketch places a voice call to a remote phone number that you enter through the serial monitor. 
to:

Examples > GSM libreay

Make Voice Call

This sketch connects a voice call from your GSM shield and Arduino to a remote phone number entered through the serial monitor. You'll need to attach a speaker and microphone o hear the connected phone and send your voice.

Added lines 24-127:
Changed lines 136-249 from:
to:
January 30, 2013, at 10:56 AM by Scott Fitzgerald -
Changed lines 5-6 from:

This example shows how to use the GSM Shield and Library to make voice calls. Please click here for more information on the GSM library.

to:
 This sketch places a voice call to a remote phone number that you enter through the serial monitor. 
Added line 11:
Added lines 27-29:

To make it work, open the serial monitor, and when you see the READY message, type a phone number. Make sure the serial monitor is set to send a just newline when you press return.

Changed line 38 from:
to:
November 16, 2012, at 08:17 PM by Scott Fitzgerald -
October 25, 2012, at 05:51 PM by David Cuartielles -
Added lines 1-34:

Share