CYTRON SKM53 GPS SHIELD WITH ARDUINO UNO

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

CYTRON SKM53 GPS SHIELD WITH ARDUINO UNO

Postby hanisahH » Mon Nov 20, 2017 3:10 pm

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);
     }   

  }
  }
Attachments
Result gps.PNG
hanisahH
Fledgling
 
Posts: 1
Joined: Mon Nov 20, 2017 3:03 pm

Re: CYTRON SKM53 GPS SHIELD WITH ARDUINO UNO

Postby ober » Tue Nov 21, 2017 6:05 am

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.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm


Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 15 guests