Hello,
I am using a [Qwiic Pro Micro, [Mini GPS Shield and [GP-735 to setup a GPS system. I am currently following the examples given in the GPS shield guide to check that everything is working. I have attempted to use this code:
/******************************************************************************
Mini_GPS_Shield_Serial_Example.ino
Example using the Mini GPS Shield with the GP-735
Alex Wende @ SparkFun Electronics
October 12th 2016
~
This sketches uses the Mini GPS Shield with the
GP-735 (https://www.sparkfun.com/products/13670). The Arduino reads the data
from the GPS module on the defined software serial pins, and prints data on
to the serial window.
Resources:
SoftwareSerial.h (included with Arduino IDE)
TinyGPS++.h
Development environment specifics:
Arduino 1.0+
Hardware Version 10
This code is beerware; if you see me (or any other SparkFun employee) at
the local, and you've found our code helpful, please buy us a round!
Distributed as-is; no warranty is given.
******************************************************************************/
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define RX_PIN 4 // GPS TX
#define TX_PIN 5 // GPS RX
#define LED_PIN 7 // GPS Fix LED
#define GPS_BAUD 9600 // GP-735 default baud rate
TinyGPSPlus gps;
SoftwareSerial ss(RX_PIN,TX_PIN);
void setup() {
Serial.begin(115200); // Begin serial communication with computer
ss.begin(GPS_BAUD); // Begin serial communication with GPS
pinMode(LED_PIN,OUTPUT);
Serial.println("Date Time Latitude Longitude Alt Course Heading Speed");
Serial.println("(MM/DD/YY) (HH/MM/SS) (deg) (deg) (ft) (mph)");
Serial.println("-------------------------------------------------------------------------");
}
void loop() {
char gpsDate[10];
char gpsTime[10];
if(gps.location.isValid()){ // GPS has a fix
digitalWrite(LED_PIN,HIGH); // Turn LED on
sprintf(gpsDate,"%d/%d/%d", gps.date.month(),gps.date.day(),gps.date.year()); // Build date string
sprintf(gpsTime,"%d/%d/0%d", gps.time.hour(),gps.time.minute(),gps.time.second()); // Build time string
Serial.print(gpsDate);
Serial.print('\t');
Serial.print(gpsTime);
Serial.print('\t');
Serial.print(gps.location.lat(),6);
Serial.print('\t');
Serial.print(gps.location.lng(),6);
Serial.print('\t');
Serial.print(gps.altitude.feet());
Serial.print('\t');
Serial.print(gps.course.deg(),2);
Serial.print('\t');
Serial.println(gps.speed.mph(),2);
}
else // GPS is looking for satellites, waiting on fix
{
digitalWrite(LED_PIN,LOW); // Turn LED off
Serial.print("Satellites in view: ");
Serial.println(gps.satellites.value());
}
smartDelay(1000);
}
// Delay ms while still reading data packets from GPS
static void smartDelay(unsigned long ms)
{
unsigned long start = millis();
do
{
while(ss.available())
{
gps.encode(ss.read());
}
} while(millis() - start < ms);
}
with no success. It simply prints “Satellites in view: 0” forever, despite taking the unit outside for several minutes. I have checked my solder joints with a mulitmeter and am reasonably confident they are not the issue. I have also adjusted the code to only turn on the LED:
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define RX_PIN 4 // GPS TX
#define TX_PIN 5 // GPS RX
#define LED_PIN 7 // GPS Fix LED
#define GPS_BAUD 9600 // GP-735 default baud rate
TinyGPSPlus gps;
SoftwareSerial ss(RX_PIN,TX_PIN);
void setup() {
Serial.begin(115200); // Begin serial communication with computer
ss.begin(GPS_BAUD); // Begin serial communication with GPS
pinMode(LED_PIN,OUTPUT);
}
void loop() {
digitalWrite(LED_PIN,HIGH);
}
and the LED does come on, so that part is working. Any ideas what could be going on here or how to fix it?
Thanks!](GPS Receiver - GP-735 (56 Channel) - GPS-13670 - SparkFun Electronics)](https://www.sparkfun.com/products/14030)](https://www.sparkfun.com/products/15795)