I've been trying to get the Adafruit Ultimate GPS Module to output my coordinates, but I'm having no luck so far it seems. All components are new and I've tried a few different GPS modules, including a Beitian-220 and a uBlox Neo-6M which are both bought from eBay, but the Adafruit module is from a reliable website in case that's a concern.
My current setup is as following:
Arduino Uno connects to my computer with a USB cable, and also connects to GND, VCC, TX and RX of the GPS module. I'm in a flat/apartment, so I've connected the GPS module to an antenna with a 5m extension cable (and a couple of cable adapters) so I can put it by the window.Code is from TinyGPS++:
Code: Select all
// Test code for Adafruit GPS modules using MTK3329/MTK3339 driver
//
// This code just echos whatever is coming from the GPS unit to the
// serial monitor, handy for debugging!
//
// Tested and works great with the Adafruit Ultimate GPS module
// using MTK33x9 chipset
// ------> http://www.adafruit.com/products/746
// Pick one up today at the Adafruit electronics shop
// and help support open source hardware & software! -ada
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
// Connect the GPS Power pin to 5V
// Connect the GPS Ground pin to ground
// Connect the GPS TX (transmit) pin to Digital 8
// Connect the GPS RX (receive) pin to Digital 7
// You can change the pin numbers to match your wiring:
SoftwareSerial mySerial(8, 7);
#define PMTK_SET_NMEA_UPDATE_1HZ "$PMTK220,1000*1F"
#define PMTK_SET_NMEA_UPDATE_5HZ "$PMTK220,200*2C"
#define PMTK_SET_NMEA_UPDATE_10HZ "$PMTK220,100*2F"
// turn on only the second sentence (GPRMC)
#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
// turn on GPRMC and GGA
#define PMTK_SET_NMEA_OUTPUT_RMCGGA "$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn on ALL THE DATA
#define PMTK_SET_NMEA_OUTPUT_ALLDATA "$PMTK314,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
// turn off output
#define PMTK_SET_NMEA_OUTPUT_OFF "$PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28"
#define PMTK_Q_RELEASE "$PMTK605*31"
void setup() {
while (!Serial); // wait for Serial to be ready
Serial.begin(115200); // The serial port for the Arduino IDE port output
mySerial.begin(9600);
delay(2000);
Serial.println("Software Serial GPS Test Echo Test");
// you can send various commands to get it started
//mySerial.println(PMTK_SET_NMEA_OUTPUT_RMCGGA);
mySerial.println(PMTK_SET_NMEA_OUTPUT_ALLDATA);
mySerial.println(PMTK_SET_NMEA_UPDATE_1HZ);
Serial.println("Get version!");
mySerial.println(PMTK_Q_RELEASE);
}
void loop() {
if (Serial.available()) {
char c = Serial.read();
Serial.write(c);
mySerial.write(c);
}
if (mySerial.available()) {
char c = mySerial.read();
Serial.write(c);
}
}
As well as that, I've also tried connecting the GPS module directly to the computer with a USB to serial converter.
Here's a chunk of the output I'm getting after leaving the antenna connected to an Adafruit ultimate by the window for 45 minutes.
I'm new to this so any and all help is appreciated, and do let me know if I missed out any important information.01:12:01.520
$GPGSV,1,1,00*79
01:12:01.584
$GPRMC,010241.800,V,,,,,0.00,0.00,050180,,,N*4F
01:12:02.456
$GPGGA,010242.800,,,,,0,0,,,M,,M,,*45
01:12:02.488
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:02.539
$GPRMC,010242.800,V,,,,,0.00,0.00,050180,,,N*4C
01:12:03.455
$GPGGA,010243.800,,,,,0,0,,,M,,M,,*44
01:12:03.486
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:03.538
$GPRMC,010243.800,V,,,,,0.00,0.00,050180,,,N*4D
01:12:04.456
$GPGGA,010244.800,,,,,0,0,,,M,,M,,*43
01:12:04.491
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
01:12:04.539
$GPRMC,010244.800,V,,,,,0.00,0.00,050180,,,N*4A
01:12:05.456
$GPGGA,010245.800,,,,,0,0,,,M,,M,,*42
01:12:05.493
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
Thank you!