sim 900

Hi every one

i start working with (SIM 900)

i have the code and i try to send the sms to a mobile phone, but it did not work, it's only send on serial monitor.

can some body help me please.

Hi every one

i start working with (SIM 900)

i have the code and i try to send the sms to a mobile phone, but it did not work, it's only send on serial monitor.

can some body help me please.

this is the code :

/Note:This code is used for Arduino 1.0 or later/
#include <SoftwareSerial.h>
SoftwareSerial Sim900Serial(2, 3);

void powerUp()
{
pinMode(7, OUTPUT);
digitalWrite(7,LOW);
delay(1000);
digitalWrite(7,HIGH);
delay(2000);
digitalWrite(7,LOW);
delay(3000);
}

void setup()
{
Sim900Serial.begin(115200); // the GPRS baud rate
delay(500);
Sim900Serial.println("AT+IPR=19200");
delay(500);
Sim900Serial.begin(19200); // the GPRS baud rate
delay(1000);
Serial.begin(9600); // the Hardware serial rate
Serial.println("Please type 's' to send SMS");
}

void loop()
{
if (Serial.available())
switch(Serial.read())
{
case 's':
SendTextMessage();
break;
}
if (Sim900Serial.available())
Serial.write(Sim900Serial.read());
}
void SendTextMessage()
{
Sim900Serial.print("AT+CMGF=1\r"); //Sending the SMS in text mode
delay(100);
Sim900Serial.println("AT + CMGS = "+97333130133"");//The target phone number
delay(100);
Sim900Serial.println("hello");//the content of the message
delay(100);
Sim900Serial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
Sim900Serial.println();
}

What Sim900 are you using , a Sim900 shield ( make?) or a small module.

Are you using an unlocked SIM card? I think this is your problem.