I'm working on a project that would require acquiring GPS data. The issue is that getting a GPS fix can take a long time, especially if inside a building. To mitigate this long wait, I would like my program to continue working while the GPS waits for the proper fix.
Which Microcontroller should I use? ESP32 or ESP8266 or Pico? What library should I use to implement this example of parallel processing?
All of the GPS libraries I know of accept data one character at a time. In loop() you check the serial port connected to the GPS and if there is a character waiting you process it.
I like the TinyGPS++ (a.k.a. TinyGPSplus) library. It has "isValid" functions for most of the data fields so you can use the data once it becomes valid.
The problem is that when the microcontroller is capturing data from the GPS, it's unable to perform another task like displaying the heading from the magnetometer or getting the time from the RTC library.
I'm interested in having the GPS data captured as a separate parallel process to the loop. Once the GPS data is acquired, the latitude and longitude are used b the loop.
I had a stand alone 328p and ended up using the internal uart within the micro to talk to the satellite receiver. Worked much better than the libraries..
Forum members have provided more than enough information to solve the problem. Implement their suggestions, and let us know if you run into further trouble.