Hello Guys
I hate asking stupid questions here but I'm stuck.
I purchased the Skylab SKM53 tiny GPS awhile back and I'm Just now getting around to finding uses for it.
I went to this site http://fut-electronics.com/wp-content/plugins/fe_downloads/Uploads/Connecting%20Skylab%20SKM53%20GPS%20module%20with%20Arduino%20and%20Demo%20code.pdf
Which describes the basic use, gives simple sketch, links to Library's needed and when the sketch is ran returns current global position.
The Sketch is below and the errors it returns when I try to compile it are also below that.
My question is, I assume the reason I have the errors is the placement of the library's or the type of library's I have installed.
Looking at the errors can you tell if they are in the right location? Or if I have the correct ones at all?
I have NewSoftSerial, Mbed and TinyGPS Libraries installed and all are installed under the sketch/library's folders.
Thanks in advance for any help!
#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;
//Future Electronics Egypt Ltd. (Arduino Egypt).
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;
//Future Electronics Egypt Ltd. (Arduino Egypt).
}
}
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
}
}
In file included from GPS.ino:1:
C:\Documents and Settings\dad\My Documents\Arduino\libraries\TinyGPS/TinyGPS.h:23:18: error: mbed.h: No such file or directory
In file included from GPS.ino:2:
C:\Documents and Settings\dad\My Documents\Arduino\libraries\NewSoftSerial/NewSoftSerial.h:33:2: error: #error NewSoftSerial has been moved into the Arduino core as of version 1.0. Use SoftwareSerial instead.
In file included from GPS.ino:2:
C:\Documents and Settings\dad\My Documents\Arduino\libraries\NewSoftSerial/NewSoftSerial.h:99: error: conflicting return type specified for 'virtual void NewSoftSerial::write(uint8_t)'
C:\Program Files\Arduino\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'
In file included from GPS.ino:4:
C:\Program Files\Arduino\hardware\arduino\cores\arduino/Arduino.h:94: error: conflicting declaration 'typedef uint8_t byte'
C:\Documents and Settings\dad\My Documents\Arduino\libraries\TinyGPS/types.h:4: error: 'byte' has a previous declaration as 'typedef char byte'
C:\Program Files\Arduino\hardware\arduino\cores\arduino/Arduino.h:105: error: 'long unsigned int millis()' redeclared as different kind of symbol
C:\Documents and Settings\dad\My Documents\Arduino\libraries\TinyGPS/types.h:5: error: previous declaration of 'typedef int millis'