How to track coordination in NEO 6m GPS

Hello everybody i wish you all fine, I need a help in my project , My project is a race. At the starting point, I want to save the location that I am in. If I cross the starting point again, I want it to be sent and count in the serial monitor i= 1. The end is seven rounds, and if I reach the last round, I want to alert by buzzer. I will save the starting point by pressing a push button. my code below

#include<SoftwareSerial.h>
SoftwareSerial NEO6M(2,3);
int buzzer = 7; 
int buttonState = 0;



void setup() {
  // put your setup code here, to run once:
Serial.begin(115200);

NEO6M.begin(9600);
pinMode(6, INPUT);
pinMode(buzzer, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
   buttonState = digitalRead(6);
while(NEO6M.available()>0){
Serial.write(NEO6M.read());
}
}

thank you

A 5V Uno, a 3.3V GPS, the GPS's Rx line hooked up to a 5V signal, and there's trouble ahead.

Check the instructions for your GPS module.

Since it is a 3.3V sensor, logic level shifters (something like this one) are required to communicate properly with a 5V Arduino.

They may be built into the GPS module, but if not, you need to supply them yourself, otherwise you may destroy both the Arduino and the GPS unit.

Hello jremington, thank you for your replay

I will change the supply power to 3.3V, am beginner and i need a lot of help for my project .

Hello van_der_decken . I will change it, thank you

can you help me with the code ?

If you want examples of working out how close you are to a particular location, check the TinyGPSPlus library, there are examples of distance calculations provided.