Hi all, I have a generic question and looking for some advice.
I have an
- adruino mega
- TFMini Lidar
- GPS NEO6-M
- SD card
Lidar and GPS have their own com port on the Arduino.
My setup, reads in the loop() function the lidar data, the gps positions and saves it on the sd card syncing on the timestamp of the measure.
The data coming from the lidar are at much higher rate than gps data but still you read it sequential
Thus, I get 1 lidar measure, 1 GPS measure, and save to disk. What I want is the for the time the gps takes a measure, to save as much as possible from the lidar.
Is anyway, while the loop() waits for the GPS data baud rate, to keep reading the lidar sensor? In other words, how could i write a script, that gets data in parallel and based on the baud rate get say 10 lidar measures and 1 GPS reading?
Thanks in advace