hi guy, im having a problem with my gps tracking decive.im using Icomsat v1.1 and arduino gps shield.i want to receive a gps coordinate to my mobile phone using this code.
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
#include "call.h"
#include <SoftwareSerial.h>
#include <TinyGPS.h>
CallGSM call;
SMSGSM sms;
TinyGPS gps;
SoftwareSerial ss(4, 5);
char number[20];
byte stat=0;
int value=0;
int pin=1;
char value_str[5];
void setup()
{
pinMode(pin,INPUT);
Serial.begin(115200);
ss.begin(9600);
Serial.println("GSM Shield testing.");
if (gsm.begin(2400))
Serial.println("\nstatus=READY");
else Serial.println("\nstatus=IDLE");
};
void loop()
{
stat=call.CallStatusWithAuth(number,0,0);
if(stat==CALL_INCOM_VOICE_AUTH)
{
call.HangUp();
delay(2000);
value=digitalRead(1);
itoa(value,value_str,10);
sms.SendSMS("+60134440132","Device Coordinate is :");
}
delay(1000);
bool newData = false;
for (unsigned long start = millis(); millis() - start < 1000;)
{
while (ss.available())
{
char c = ss.read();
if (gps.encode(c))
newData = true;
}
}
if (newData)
{
float flat, flon;
gps.f_get_position(&flat, &flon);
Serial.print("LAT=");
Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
Serial.print(" LON=");
Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
Serial.println();
}
};
but i did not receive the gps coordinate coordinate.please help me..