SoftwareSerial Library Issue

#include "GPS.h"

GPS gps(4, 5);

void setup() {
  Serial.begin(115200);
  Serial.println();
  while (!gps.begin())
    ;
  Serial.println("...DateTime...");
  Serial.println();
  Serial.println(gps.getDateTime());
  Serial.println();
  Serial.println("...Reading...");
  Serial.println();
}

void loop() {
  Serial.println(gps.readString());
}

C:\Users\Dev\Desktop\first_program\sketch_jan26a\sketch_jan26a.ino:1:10: fatal error: GPS.h: No such file or directory
#include <SoftwareSerial.h>
^~~~~~~
compilation terminated.
exit status 1

Compilation error: GPS.h: No such file or directory

I am getting this error How to resolve this?

Do you have this file on your PC and, if so, where is it located and where did you get it from ?

@UKHeliBob

Dawnloaded this from Library manager

What is the path to your Sketchbook folder in IDE Preferences ?

Your error message is confusing. It says it can not find GPS.h, but the line highlighted is for the SoftwareSerial library which you don't have in the sketch you posted.

It looks like you haven't installed that SoftwareSerial library, required by that GPS library...

The SoftwareSerial library is installed automatically with the IDE and @webydev looks like he/she is compiling for a Uno so the library should be available

I am suspicious, however, that the sketch is not in the sketchbook folder

@UKHeliBob Its fixed now i just restart the IDE Again and worked successfully

This is my GPS Module which lib should i use for this?

The error message is showing the #include line in the file GPS.h as the location of the problem, not an error with finding GPS.h itself.

TinyGPSPlus seems a good bet

This is the confusing part:

@UKHeliBob I Lib you told to use i am using the same lib now but didn't got any signals from it

Please post a schematic showing how you have the modules of your project connected and powered. and the sketch that you are running

Is the GPS module getting a fix from the satellites ? This is usually indicated by an LED flashing on teh GPS unit

#include <SoftwareSerial.h>

#define rxPin 8
#define txPin 9
SoftwareSerial gpsSerial(rxPin,txPin); 

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and SIM800L
  gpsSerial.begin(9600);

  Serial.println("Initializing...");
  delay(1000);
}

void loop()
{
  while (gpsSerial.available() > 0)
    Serial.write(gpsSerial.read());
}
b^
BZQ3[�CPB��c��אJBv�Lb/����H�S¥B�Aʈ�ƵNtb��Cj-��c��,�bNrRƜDs‡sJvC^S�R�C�CR��J7CF
Bt�C�CZ+���אKCT�Lb-����H�S��B�Aʈ��CNTb��Ch-��c�!��bNrRƜJs„�BvC^R��c��hMR�cD7BD
CV�C�B\v+cڥrRJCV�Lb/����H�S¥B�@ʈ��CNtc��h�cBcڲC�j��C�bvBZ�Cj�B��rB�C�B�V
P�s�B��rZC\��cJ5Ua��SOP�^�cz#���L�S¥B�@ʈ��CHtb��h�bBcڲC�j��C�bZ!s^g�sHe�R�cbsƒC�A҇�BWRJ�cj��R8C^��Rh�B�B^
F���H�S¥B�@ʈ�ƵNdb��j-��c��.�bNrR�rJrB��BwC^R�R�C�CR��J7CF
Cr�C�C^v+�ڧrRJCV�Lb-����L�S¥B�@ʈ�ƵNtb��Ch-��c�!��bNrRƜJs�HtB�"B�B�Be�^�SJ�c��FsF�b���RCT��c��CRb���H�S��d�ڐi8��(%�ǵR�3Zr^�z��bNrRƜJr†�BwB^Q P�c��cZC��s��S܅R�Bp�iB�S�a�"BƅʊBf���H�S¥B�@ʈ�ƵNdb��j-��c��,�bNsRƜJr†�BvB^S�Rӆ\�`J
c^
CZQZ�CRB��bZ0V�AJ��@�aʋBf���H�SŒ`�ڐ���CNTb��Ch-��c�!��cNsRƜBr„�BvB^S�R�C�Cҧ�J7BFAR�C�C\v��3�אKBV�Lb-����H�S¥B�@ʈ��BNTb��Ch-��c�!��bNrRƜBrB��BwC^S�R�C�CҧbD7CD
Br�C�B\v+b��
rRJCV�Lb/����H�S¥B�@ʈ�ĵNtb��Cj-��c��C\C\

I am Getting this type of data my baud rate is also correct according to the code 115200 Baud Rate

@UKHeliBob if you have any thing please let me know

The code does not set the Serial interface to115200 baud if that is what you mean. What baud rate have you got the Serial monitor set to ?

@UKHeliBob

#include <SoftwareSerial.h>

#define rxPin 8
#define txPin 9
SoftwareSerial gpsSerial(rxPin,txPin); 

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(115200);
  
  //Begin serial communication with Arduino and SIM800L
  gpsSerial.begin(9600);

  Serial.println("Initializing...");
  delay(1000);
}

void loop()
{
  while (gpsSerial.available() > 0)
    Serial.write(gpsSerial.read());
}

This is my code i have started a serial monitor on baud rate 115200 and i am receiving data as shown above

Do you see the "Initializing..." message ?

You may need to reset the Uno with the Serial monitor open to see it

Have you got anything attaches to pins 0 or 1 of the Uno ?

Yes i see Initializing... This message
i did reset as well No there is no attachment with 0 and 1

Have you tried running u-center

no i haven't used this before can you help me with this what it does ?