Skip to main content
2 of 2
deleted 176 characters in body

GPS Module Outputting Question Marks in Serial Window

I've got a uBlox Neo 7N GPS Module and configured it so if theres is no incoming data print no location but if there is print the latitude and longitude. However it's printing ?,?.

So I'm assuming it's wired correctly as I'm getting an output however maybe my code is preventing it from printing the two long numbers hence converting it to a ? instead.

  char buf[128];   
  if (gps.location.isValid()) {
    snprintf(buf, sizeof(buf), "%lf,%lf", gps.location.lat(), gps.location.lng());
    Serial.println(buf);
  }

EDIT I know that Im getting a read as I set two variables of type double lat and long to equal gps.location.lat() and gps.location.lng() respectively and I'm getting a number. How do I fix up this snprintf line so it prints properly?