SD/MMC Shield http://www.e-gizmo.com/KIT/SD%20%20MMC%20Shield.html
GSM/GPS http://www.e-gizmo.com/KIT/gsm%20shield.html
Gizduino (arduino clone) http://www.e-gizmo.com/KIT/Gizduino.html
both SD and GSM are working fine but when i integrate both, i got this problem, the arduino will restart then begin initializing from the beginning after receiving SMS.
if i send "ON" sms the microcontroller should open the SD card and read test.txt file
if its existing or not
but then, when the GSM received "ON",
the Gizduino(arduino clone) will restart the GSM as if it is rebooting and initialize from the beginning and would not read/open the SD card.
void loop()
{
pos=sms.IsSMSPresent(SMS_UNREAD);
Serial.println((int)pos);
if((int)pos>0&&(int)pos<=30)
{
Serial.print("Message Received, INBOX=");
Serial.println((int)pos);
message[0]='\0';
sms.GetSMS((int)pos,number,message,180);
Serial.println(message);
if(strstr(message, "ON"))
{
//Here's the problem, when it receive "ON", the GSM will back initializing as if it was turn off and then turn on again and won't read this state.
if (SD.exists("test.txt")) {
Serial.println("test.txt exists.");
}
else {
Serial.println("example.txt doesn't exist.");
}
}
sms.DeleteSMS((int)pos);
}
delay(5000);
}
help me please,