receiving sms message

Hello ..

iam trying to make a simulation to my graduation program by Proteus 8 Professional , the main idea is to receive sms message when i go away from a sensor , i try to do more than thing but still cant receive sms .

iam connecting my nokia phone which is supporting AT Commands by usb cable on Com3 on my Computer and using hyperteminal too .

i think there is a problem in my code , so plz any one can tell me where is the problem ?

[code]


#include <SoftwareSerial.h>
#include <sms.h>




SoftwareSerial call(0,1);



int thisChar;
int LDR = A0;


int ldrReading;


int ledPin = 13;




int light_sensitivity=150;
int timesToSend = 1;        // Numbers of calls to make
int count=0;



void setup() 
{
call.begin(9600);
pinMode(LDR, INPUT); // declare the LDR as an INPUT

pinMode(ledPin,OUTPUT);

}



void sending()
{   

 while (count < timesToSend)
{
 call.println("AT"); // Sends AT command to wake up cell phone
delay(500);
call.println("AT+CMGF=1"); // Puts phone into SMS mode
delay(100);
call.println("AT+CMGS=\"+972599122910\"");
delay(100);


call.print("  Warning: - Your Car began to exceed the safe zone, Now  it found in coordinates(X,Y,Z)=(24,11,91"); 
}



delay(100);
call.write(byte(26));
delay(100);
call.println("AT+CMSS=1"); 
delay(10);
  count++;
  
  }



void loop() 
{ 
ldrReading = analogRead(LDR);



if(ldrReading  > 100) 
  {     
  
   sending();
   
 }

 
}

[/code]

i think there is a problem in my code

Yes, there is.

SoftwareSerial call(0,1);

It's silly to try to do software serial on the hardware serial pins. If you are not using them to debug your code, use Serial to talk to the GSM, not an instance of SoftwareSerial.

Of course, tying up the hardware serial pins to talk to the GSM is a bad idea, because then you can't debug your code.

Thanx , but i still not found a solution ..

Thanx , but i still not found a solution ..

What have you tried? What happened?