Hello!
I am using a Sparkfun MG2639 shield and an Arduino Leonardo in a project I am currently working on.
Right now I am trying to connect to the GPS module on the shield using hardware serial on pin 0 and 1, which is available if you solder some jumpers on the back of the shield. The jumpers are properly soldered but when I run my code I recieve
$GPGGA,093952.080,,,,,0,0,,,M,,M,,*44
$GPGSA,A,1,,,,,,,,,,,,,,
from the GPS, then nothing.
This is the code I am currently running. I understand that it wont spit out anything other than gibberish but right now I'm just trying to establish stable communication between the Leonardo and the GPS module on the shield.
#include <SFE_MG2639_CellShield.h>
#include <TinyGPS++.h>
#define GPS_BAUD_RATE 115200 // The GPS Shield module defaults to 9600 baud
// Define the serial monitor port. On the Leonardo this is 'Serial'
// but on other boards this may be 'SerialUSB'
#define SerialMonitor Serial // e.g. Arduino Leonardo
// Define the harware serial port on pins 0/1. On the Leonardo this is 'Serial1'
// but on other boards this may be 'Serial'
#define gpsPort Serial1 // e.g. Arduino Leonardo
// See https://www.arduino.cc/en/Reference/Serial to find out which Serial ports
// you should use in the defines above.
int8_t status;
TinyGPSPlus gps;
void setup()
{
SerialMonitor.begin(115200);
gpsPort.begin(GPS_BAUD_RATE);
while(!SerialMonitor);
while(!gpsPort);
status = cell.begin();
if (status <= 0)
{
Serial.println("Unable to communicate with shield. Looping");
while(1)
;
}
}
void loop()
{
while(gpsPort.available()) // If GPS data is available
SerialMonitor.write(gpsPort.read()); // Send it to the serial monitor
}