GPS Modul L86 and LILYGO T5 V2.3.1

Dear Community,

I would like to build a GSP Tracker with a GPS Module: Quectel L86-M33 and a LILYGO T5 V2.3.1 board. For this I start with the following code. The two components are connected hardware wise as follows:
Board RXPin 21 <-> GPS Module Pin 2
Board TXPin 22 <-> GPS Module Pin 1

Application used: Arduino IDE V2.0.2

Unfortunately, I do not get any usable information in the monitor. See picture. What am I doing wrong? Any idea how I can get further on this? Thanks for your support.

// ESP32 Board and E-Paper Screen: LILYGO T5 V2.3.1 DEPG0213BN http://www.lilygo.cn/claprod_view.aspx?TypeId=62&Id=1391&FId=t28:62:28
// GPS Module: Quectel L86-M33 https://www.quectel.com/product/gnss-l86

#include <HardwareSerial.h> 
#include <TinyGPS++.h>
 
TinyGPSPlus gps;
HardwareSerial SerialGPS(2); // 1 = USB Serial, 2 or 3 for GPS Communication
static const int RXPin = 21, TXPin = 22; // Pin for Communication with GPS / Board RXPin 21 <-> GPS Module 2 / Board TXPin 22 <-> GPS Module 1
 
void setup() {
    Serial.begin(115200); // Serial Monitor
    SerialGPS.begin(38400, SERIAL_8N1, RXPin, TXPin); // Communucication with GPS Module
}

void loop() {
    while (SerialGPS.available() > 0) {
        gps.encode(SerialGPS.read());
        char c = SerialGPS.read();
        Serial.print("AVA=");  Serial.print(SerialGPS.available()); Serial.print(" - ");
        Serial.print("LAT=");  Serial.print(gps.location.lat()); Serial.print(" - ");  
        Serial.print("LONG="); Serial.print(gps.location.lng()); Serial.print(" - ");
        Serial.print("ALT=");  Serial.print(gps.altitude.meters()); Serial.print(" // ");
        Serial.print("READ=");  Serial.print(c); Serial.print(" - ");
        Serial.print("ENCODE=");  Serial.println(gps.encode(SerialGPS.read())); 
        delay(1000);
         }
    
        Serial.print("No Data available");  Serial.print(SerialGPS.read()); Serial.println();
        delay(2000);
}

Check the baud rate for the GPS device. For ex. NEO6-M some datasheets say 4800 but the circuit has a default of 9600. Try a few lower baud rates!
For a none functioning circuit I usually asks for schematics......

Dear Railroader, thanks for the quick support. I have tried SerialGPS.begin with 2400, 4800 and 9600. 9600 shows a better result. However, I still do not get any coordinates. To complete, here is a schematic of my setup.

Any other suggestions?

Thanks

The quote caught my eye, right ro wrong.
The last quoted line looks dangerous to me. The third line of this code is supposed to do the job. the last line is stealing a character from the next block, is giving "char c" a not valid item.
Drop the delays. During the 3 seconds in delay lots of data might be sent from the GPS, overwritten and lost.
You can use millis() to control when there is time for a Serial.print or not but don't delay the GPS reading lines!

Thank you very much for the great support, highly appreciated :+1: It works as expeced. :slightly_smiling_face:
Solution: Don't use delay()

Great. Thanks for telling.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.