gps skm53 programming error in atmega1280

#include <TinyGPS.h>
#include <NewSoftSerial.h>
unsigned long fix_age;
NewSoftSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;
void setup(){
GPS.begin(9600);
Serial.begin(115200);
}
void loop(){
long lat, lon;
unsigned long fix_age, time, date, speed, course;
unsigned long chars;
unsigned short sentences, failed_checksum;
// retrieves +/- lat/long in 100000ths of a degree
gps.get_position(&lat, &lon, &fix_age);
// time in hh:mm:ss, date in dd/mm/yy
/*gps.get_datetime(&date, &time, &fix_age);
year = date % 100;
month = (date / 100) % 100;
day = date / 10000;
hour = time / 1000000;
minute = (time / 10000) % 100;
second = (time / 100) % 100;
Serial.print(“Date: “);
Serial.print(year); Serial.print(”/”);
Serial.print(month); Serial.print("/");
Serial.print(day);
Serial.print(" :: Time: “);
Serial.print(hour); Serial.print(”:");
Serial.print(minute); Serial.print(":");
Serial.println(second);
*/
getGPS();
Serial.print("Latitude : “);
Serial.print(LAT/100000,7);
Serial.print(” :: Longitude : ");
Serial.println(LON/100000,7);
}
void getGPS(){
bool newdata = false;
unsigned long start = millis();
// Every 1 seconds we print an update
while (millis() - start < 1000)
{
if (feedgps ()){
newdata = true;
}
}
if (newdata)
{
gpsdump(gps);
}
}
bool feedgps(){
while (GPS.available())
{
if (gps.encode(GPS.read()))
return true;
}
return 0;
}
void gpsdump(TinyGPS &gps)
{
//byte month, day, hour, minute, second, hundredths;
gps.get_position(&lat, &lon);
LAT = lat;
LON = lon;
{
feedgps(); // If we don’t feed the gps during this long
routine, we may drop characters and get checksum errors
}
}

error:'routine 'was not declared in the scope

    feedgps(); // If we don't feed the gps during this long
    routine, we may drop characters and get checksum errors

Either make this a multi-line comment or put // at the start of the second line

still getting that error

Post the revised code

#include <TinyGPS.h>
#include <NewSoftSerial.h>
unsigned long fix_age;
NewSoftSerial GPS(2,3);
TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;
void setup(){
GPS.begin(9600);
Serial.begin(115200);
}
void loop(){
long lat, lon;
unsigned long fix_age, time, date, speed, course;
unsigned long chars;
unsigned short sentences, failed_checksum;
// retrieves +/- lat/long in 100000ths of a degree
gps.get_position(&lat, &lon, &fix_age);
// time in hh:mm:ss, date in dd/mm/yy
/*gps.get_datetime(&date, &time, &fix_age);
year = date % 100;
month = (date / 100) % 100;
day = date / 10000;
hour = time / 1000000;
minute = (time / 10000) % 100;
second = (time / 100) % 100;
Serial.print(“Date: “);
Serial.print(year); Serial.print(”/”);
Serial.print(month); Serial.print("/");
Serial.print(day);
Serial.print(" :: Time: “);
Serial.print(hour); Serial.print(”:");
Serial.print(minute); Serial.print(":");
Serial.println(second);
/
getGPS();
Serial.print("Latitude : “);
Serial.print(LAT/100000,7);
Serial.print(” :: Longitude : ");
Serial.println(LON/100000,7);
}
void getGPS(){
bool newdata = false;
unsigned long start = millis();
// Every 1 seconds we print an update
while (millis() - start < 1000)
{
if (feedgps ()){
newdata = true;
}
}
if (newdata)
{
gpsdump(gps);
}
}
bool feedgps(){
while (GPS.available())
{
if (gps.encode(GPS.read()))
return true;
}
return 0;
}
void gpsdump(TinyGPS &gps)
{
//byte month, day, hour, minute, second, hundredths;
gps.get_position(&lat, &lon);
LAT = lat;
LON = lon;
{
feedgps(); // If we don’t feed the gps during this long
//routine, we may drop characters and get checksum errors
/
}
}

Are you getting the same error or a different one ? What line is highlighted when you get the error ?

now it is error in compiling.

Any body to help?

#include <TinyGPS.h>
#include <SoftwareSerial.h>

unsigned long fix_age;
SoftwareSerial GPS(2,3);

TinyGPS gps;
void gpsdump(TinyGPS &gps);
bool feedgps();
void getGPS();
long lat, lon;
float LAT, LON;
void setup(){
  GPS.begin(9600);
  Serial.begin(115200);
}
void loop(){
  long lat, lon;
  unsigned long fix_age, time, date, speed, course;
  unsigned long chars;
  unsigned short sentences, failed_checksum;
  // retrieves +/- lat/long in 100000ths of a degree
  gps.get_position(&lat, &lon, &fix_age);
  // time in hh:mm:ss, date in dd/mm/yy
  /*gps.get_datetime(&date, &time, &fix_age);
   year = date % 100;
   month = (date / 100) % 100;
   day = date / 10000;
   hour = time / 1000000;
   minute = (time / 10000) % 100;
   second = (time / 100) % 100;
   Serial.print("Date: ");
   Serial.print(year); Serial.print("/");
   Serial.print(month); Serial.print("/");
   Serial.print(day);
   Serial.print(" :: Time: ");
   Serial.print(hour); Serial.print(":");
   Serial.print(minute); Serial.print(":");
   Serial.println(second);
   */
  getGPS();
  Serial.print("Latitude : ");
  Serial.print(LAT/100000,7);
  Serial.print(" :: Longitude : ");
  Serial.println(LON/100000,7);
}
void getGPS(){
  bool newdata = false;
  unsigned long start = millis();
  // Every 1 seconds we print an update
  while (millis() - start < 1000)
  {
    if (feedgps ()){
      newdata = true;
    }
  }
  if (newdata)
  {
    gpsdump(gps);
  }
}
bool feedgps(){
  while (GPS.available())
  {
    if (gps.encode(GPS.read()))
      return true;
  }
  return 0;
}
void gpsdump(TinyGPS &gps)
{
  //byte month, day, hour, minute, second, hundredths;
  gps.get_position(&lat, &lon);
  LAT = lat;
  LON = lon;
  {
    feedgps(); // If we don't feed the gps during this long 
    //routine, we may drop characters and get checksum errors
  }
}
error compiling







In file included from gps.ino:1:
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:25:22: error: WProgram.h: No such file or directory
In file included from gps.ino:1:
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:81: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:81: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:82: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:82: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:82: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:82: error: 'byte' has not been declared
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:130: error: 'byte' does not name a type
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:133: error: 'byte' does not name a type
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:134: error: 'byte' does not name a type
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:135: error: 'byte' does not name a type
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h: In member function 'void TinyGPS::get_position(long int*, long int*, long unsigned int*)':
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:48: error: 'millis' was not declared in this scope
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h: In member function 'void TinyGPS::get_datetime(long unsigned int*, long unsigned int*, long unsigned int*)':
C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:57: error: 'millis' was not declared in this scope

WHAT ERROR? we don't read minds, It is much easier If WE DON'T have to supply our own errors... to simulate your 'unknown errors...?' Ya Thimk?

Bob

What is the error ? What line does it occur on ? Please help us to help you.

i post error above,check it

You are using old code...

C:\Intel\Downloads\arduino-1.0.3\libraries\TinyGPS/TinyGPS.h:25:22: error: WProgram.h: No such file or directory change this to Arduino.h... Better yet the current version TinyGPS12 doesn't have those issues.. I didn't when I used it with the Same SKYLABS SKM53... I own both a U-Blox-6 and the SKM3 and it works well with both. The Adafrut GPS Library works well with both receivers as well,,, from experience

If “byte” is not declared, you have some problem with your basic type definitions.

Try putting #include “Arduino.h” at the top of the file creating the error.

WOW done compiling. @its time to close this session. But you are my teacher,from now on.