Page 1 of 1

CYTRON SKM53 GPS SHIELD WITH ARDUINO UNO

PostPosted: Mon Nov 20, 2017 3:10 pm
by hanisahH
Hi... I've been editing the programming of my gps shield + uno.
my aim is to get the latitude and longitude only.
after testing, the serial monitor display both for latitude and longitude 0.000000
Thus, can someone help what i need to do to get the correct value. Below are my code and output result attached.
Thank You..

CODE: SELECT_ALL_CODE
#include <TinyGPS.h>
#include <SoftwareSerial.h>


SoftwareSerial ss(0,1);           //software serial pin for skm53 shield
TinyGPS gps;

float flat,flon;

void setup()
{
  Serial.begin(9600);
  ss.begin(9600);
  Serial.print("");
  Serial.print("Acquiring gps");
  Serial.print("");
 
}

void loop()
{
     while(ss.available())
  {
    char c=ss.read();
    if(gps.encode(c))
    {
      gps.f_get_position(&flat,&flon);
    }
   
     {
      Serial.println("");
      Serial.print("Latitude:");
      Serial.println(flat, 6);
      Serial.print("Longitude:");
      Serial.println(flon, 6);
      delay(10000);
     }   

  }
  }

Re: CYTRON SKM53 GPS SHIELD WITH ARDUINO UNO

PostPosted: Tue Nov 21, 2017 6:05 am
by ober
1st thing I would do is to test the sample code without modification and get the GPS result. Then only slowly modify it to what I want.
At least you test the GPS shield is working, narrow down the troubleshooting scope.