Thanks a lot gF!
I bought the Ublox NEO-6M GPS Module with EEPROM for MWC/AeroQuad with Antenna for Flight Control and Aircraft just as You tipped me.
Description:
GPS modules NEO-6M, 3V-5V power supply Universal.
That tells me that 5V logic works well.
I suffor from an earlier mental overload at work. That makes me have big trouble with scanning large amounts of information and finding the gold in it. I have looked into the tutorial You advise. Maybe I can find some more keeping on.
The following code compiles OK.
SORRY, I CAN NOt FIND THE CODE TAG TOOLS IN THIS MOMENT. Sending a file in the first question works but adding code later... I have failed before.
#include <TinyGPS++.h>
/*
This sample sketch should be the first you try out when you are testing a TinyGPS++
(TinyGPSPlus) installation. In normal use, you feed TinyGPS++ objects characters from
a serial NMEA GPS device, but this example uses static strings for simplicity.
*/
// A sample NMEA stream.
const char gpsStream =
"$GPRMC,045103.000,A,3014.1984,N,09749.2872,W,0.67,161.46,030913,,,A7C\r\n"
"$GPGGA,045104.000,3014.1985,N,09749.2873,W,1,09,1.2,211.6,M,-22.5,M,,000062\r\n"
"$GPRMC,045200.000,A,3014.3820,N,09748.9514,W,36.88,65.02,030913,,,A77\r\n"
"$GPGGA,045201.000,3014.3864,N,09748.9411,W,1,10,1.2,200.8,M,-22.5,M,,00006C\r\n"
"$GPRMC,045251.000,A,3014.4275,N,09749.0626,W,0.51,217.94,030913,,,A7D\r\n"
"$GPGGA,045252.000,3014.4273,N,09749.0628,W,1,09,1.3,206.9,M,-22.5,M,,0000*6F\r\n";
// The TinyGPS++ object
TinyGPSPlus gps;
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // pick any 2 unused digital pins (not pins 0 or 1)
void setup()
{
mySerial.begin(9600); // 9600 is the default baud rate for my Neo6m units
// Serial.begin(115200);
mySerial.println(F("BasicExample.ino"));
mySerial.println(F("Basic demonstration of TinyGPS++ (no device needed)"));
mySerial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
mySerial.println(F("by Mikal Hart"));
mySerial.println();
while (*gpsStream)
if (gps.encode(*gpsStream++))
displayInfo();
mySerial.println();
mySerial.println(F("Done."));
}
void loop()
{
}
void displayInfo()
{
mySerial.print(F("Location: "));
if (gps.location.isValid())
{
mySerial.print(gps.location.lat(), 6);
mySerial.print(F(","));
mySerial.print(gps.location.lng(), 6);
}
else
{
mySerial.print(F("INVALID"));
}
mySerial.print(F(" Date/Time: "));
if (gps.date.isValid())
{
mySerial.print(gps.date.month());
mySerial.print(F("/"));
mySerial.print(gps.date.day());
mySerial.print(F("/"));
mySerial.print(gps.date.year());
}
else
{
mySerial.print(F("INVALID"));
}
mySerial.print(F(" "));
if (gps.time.isValid())
{
if (gps.time.hour() < 10) mySerial.print(F("0"));
mySerial.print(gps.time.hour());
mySerial.print(F(":"));
if (gps.time.minute() < 10) mySerial.print(F("0"));
mySerial.print(gps.time.minute());
mySerial.print(F(":"));
if (gps.time.second() < 10) mySerial.print(F("0"));
mySerial.print(gps.time.second());
mySerial.print(F("."));
if (gps.time.centisecond() < 10) mySerial.print(F("0"));
mySerial.print(gps.time.centisecond());
}
else
{
mySerial.print(F("INVALID"));
}
mySerial.println();
I am very, very thankful for Your help!