I connected the NEO-6M GPS module to an Arduino MKR NB 1500. When using the code below without a delay the altitude and number of satellites are printed correctly. However, when i insert a 2s delay the altitude and number of sattelites prints out 0 (see picture below). Can anyone tell me what i am doing wrong? Lat and Long values are blacked out for private reasons.
the Serial buffer is small and at 9600 bauds, you get 960 characters per second... so you have now missed 1920 characters from the GPS and only have the last 64 in the buffer...
use millis() to drive your display only from time to time.
Thank you so much Jackson for a clear explanation and answer to my question. U forgot the brackets in the while loop, but the code is working perfectly now!