hey guys i just needed this simple program to activate a led using gsm shield i dont know what is wrong with the program and the hardware. im getting this error
what is the errors mean?
here is the code:
#include <SoftwareSerial.h>
#include "SIM900.h"
#include <string.h>
#include "sms.h"
SMSGSM sms;
char str = 0;
int x = 0;
int y = 0;
int z = 0;
SoftwareSerial cell(2,3);
void setup()
{
Serial.begin(9600);
cell.begin(9600);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
do
{
Serial.println("Initializing..");
delay(10000);
cell.println("AT");
if(cell.available())
Serial.write((byte)cell.read());
delay(500);
Serial.println();
if(cell.find("OK"))
{
Serial.println("GSM Communicating...");
x=0;
}
else
{
Serial.println("NOT COMMUNICATING!");
x=1;
}
cell.println("AT+CMGF=1");
if(cell.available())
Serial.write((byte)cell.read());
delay(500);
Serial.println();
if(cell.find("OK"))
{
Serial.println("Set to TEXT MODE");
y=0;
}
else
{
Serial.println("Something's Wrong with CMGF!");
y=1;
}
cell.println("AT+CNMI=1,2,0,0,0");
if(cell.available())
Serial.write((byte)cell.read());
delay(500);
if(cell.find("OK"))
{
Serial.println("Set to display Messages");
z=0;
}
else
{
Serial.println("Something's Wrong with CNMI!");
z=1;
}
}
while ( x == 1 || y == 1 || z == 1 );
}
void loop()
{
if(cell.available() >0)
{
str=cell.read();
Serial.println(str);
delay(100);
if(cell.find("+639277039698") && cell.find("HI!"))
{
digitalWrite(13, HIGH);
Serial.println("HI! message received!");
delay(2000);
digitalWrite(13, LOW);
}
}
}
