I have tried contacting the manufacturers as well as many Google searches. I have tried many different libraries to get this GNSS-GPS working.
Libraries I've Tried:
Arduino_GPS
Arduino_Parser_Ublox_Neo_M8N
esp32-ublox
MicroNMEA
NEO-M8N
NeoGPS
UBLOX-NEO-M8N
The library I am trying now:
- Parser_Ublox_Neo_M8N with:
- ESPSoftwareSerial
(I have a non-AVR board so NeoSWSerial and SoftwareSerial didn't work for me.)
Link to files on GitHub: https://github.com/toskyRocker/Arduino_Parser_Ublox_Neo_M8N
My questions for someone who has done this before with a U-Blox M8N:
- Must I use U-Center software to configure the gps before it will output data?
- Does my code look to be functional? I can compile but then when attaching GPS I get the output (as my psuedo error message) that lets me know the serial connection between my TTGO T-Call V1.3 and U-Blox-M8N is not valid. Here is a link to the board I have and the GNSS-GPS:
(The "<#include SoftwareSerial.h>" in the code below is what was added when I used the Arduino IDE's drop down libraries menu when I selected espsoftwareserial to include.)
Here is the (.ino) code:
#include <SoftwareSerial.h>
#include "Ublox.h"
#define SERIAL_BAUD 115200
#define GPS_BAUD 9600
#define N_INTS 4
//gpsSerial(3,1);
Ublox M8_Gps;
// Altitude - Latitude - Longitude - N Satellites
int gpsArray[N_INTS] = {0, 0, 0, 0};
SoftwareSerial gpsSerial;
/////////////////////////////////////////////////////////////
void setup() {
Serial.begin(SERIAL_BAUD);
gpsSerial.begin(GPS_BAUD,SWSERIAL_8N1,3,1);
//gpsSerial.begin(GPS_BAUD);
pinMode(0,OUTPUT);
}
///////////////////////////////////////////////////////////
void loop() {
digitalWrite(0,LOW);
if(!gpsSerial.available()){
Serial.print("Problem with GPS ");
}
while(gpsSerial.available()){
char c = gpsSerial.read();
if (M8_Gps.encode(c)) {
gpsArray[0] = M8_Gps.altitude;
gpsArray[1] = M8_Gps.latitude;
gpsArray[2] = M8_Gps.longitude;
gpsArray[3] = M8_Gps.sats_in_use;
}
}
for(byte i = 0; i < N_INTS; i++) {
Serial.print(gpsArray[i], 10);Serial.print(" ");
}
Serial.println("");
}