receiving sms message



hello ..

iam trying make simulation graduation program proteus 8 professional , main idea receive sms message when go away sensor , try more thing still cant receive sms .

iam connecting nokia phone supporting @ commands usb cable on com3 on computer , using hyperteminal .

i think there problem in code , plz 1 can tell me problem ?




code: [select]
[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 make
int count=0;



void setup()
{
call.begin(9600);
pinmode(ldr, input); // declare ldr input

pinmode(ledpin,output);

}



void sending()
{   

 while (count < timestosend)
{
 call.println("at"); // sends @ command wake cell phone
delay(500);
call.println("at+cmgf=1"); // puts phone sms mode
delay(100);
call.println("at+cmgs=\"+972599122910\"");
delay(100);


call.print("  warning: - car began exceed safe zone, now  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]

quote
i think there problem in code
yes, there is.
code: [select]
softwareserial call(0,1);
it's silly try software serial on hardware serial pins. if not using them debug code, use serial talk gsm, not instance of softwareserial.

of course, tying hardware serial pins talk gsm bad idea, because can't debug code.



Arduino Forum > Using Arduino > Programming Questions > receiving sms message


arduino

Comments