hi i have gsm sim900a and i want to send a sms from mobile phone to the gsm and when the gsm recive the sms and then play a melody but i dont know hoe ???
pleaes help ............

no one cant help me ?????

The GSM library is included with Arduino IDE 1.0.4 and later.
You can go to

libraries \GSM\ examples\ ReceiveSMS

 SMS receiver

 This sketch, for the Arduino GSM shield, waits for a SMS message
 and displays it through the Serial port.

 * GSM shield attached to and Arduino
 * SIM card that can receive SMS messages

 created 25 Feb 2012
 by Javier Zorzano / TD

 This example is in the public domain.


// include the GSM library
#include <GSM.h>

// PIN Number for the SIM
#define PINNUMBER ""

// initialize the library instances
GSM gsmAccess;
GSM_SMS sms;

// Array to hold the number a SMS is retreived from
char senderNumber[20];

void setup()
  // initialize serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only

  Serial.println("SMS Messages Receiver");

  // connection state
  boolean notConnected = true;

  // Start GSM connection
  while (notConnected)
    if (gsmAccess.begin(PINNUMBER) == GSM_READY)
      notConnected = false;
      Serial.println("Not connected");

  Serial.println("GSM initialized");
  Serial.println("Waiting for messages");

void loop()
  char c;

  // If there are any SMSs available()
  if (sms.available())
    Serial.println("Message received from:");

    // Get remote number
    sms.remoteNumber(senderNumber, 20);

    // An example of message disposal
    // Any messages starting with # should be discarded
    if (sms.peek() == '#')
      Serial.println("Discarded SMS");

    // Read message bytes and print them
    while (c =

    Serial.println("\nEND OF MESSAGE");

    // Delete message from modem memory
    Serial.println("MESSAGE DELETED");



Hi I want when the user send a sms to the gsm then gsm play a mlody but I don't know the programming
Please help