Can comebody help me, i have a project on going and i need to, store the coordinates on point a, go to point b, then store the coordinates of point b, then determine the distance, i am very confused with other questions, also confused on what library i should use (tiny gps or tiny gps plus), the gps must work alongside the rfid scanner. when i got the code of the gps and combined it with the main code (with rfid) it just releases a value of 0.000...
#include <SPI.h> //spi bus for rfid #include <MFRC522.h> //rfid #include <Wire.h> //rfid #include <TinyGPS++.h> #include <SoftwareSerial.h>
//includes all libraries
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
struct User {
String Name;
String UID;
int Credits;
};
User Alinus = {"Alinus", "43 C8 42 21", 100};
//Users
void setup()
{
Serial.begin(9600); // Initiate a serial communication
ss.begin(GPSBaud);
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println("Approximate your card to the reader..."); //print wait for cards
Serial.println(); //space
Serial.println(gps.location.lat(),6); //this guy returns 0 whats the problem?
Serial.println(gps.location.lng(),6);
}
It is always best to get each part of a project working separately, before combining them.
Make sure that you are out of doors, with a clear view of the sky, when testing the GPS examples. With a new module, it can take several minutes to get the first satellite fix.
i was using the full example of tiny gps ++ to see if it has detected satellites, etc. each code was working properly, and i was outside, can somebody tell me another solution? cuz i think that the serial of rfid is interfering with the serial of gps, as they have the same baud rate?
Goodyminds123:
i was using the full example of tiny gps ++ to see if it has detected satellites, etc. each code was working properly, and i was outside, can somebody tell me another solution? cuz i think that the serial of rfid is interfering with the serial of gps, as they have the same baud rate?
Very unclear what your saying here.
If 'each code was working properly' means that you had the GPS working with one of the TinyGPS plus examples, then the reason your own code does not work should be obvious by comparing the two codes.
The code you posted wont work, you appear to have made an incorrect assumption as to how the GPS library works.