I'm using the Mega to read serial data sent from a compass unit. The issue is that the compass sends its status as a large block of data. Looking at the serial monitor, it's sending upwards of 200 bytes per few ms. The data is in this format:
Compass: 350 Pitch: 5 Roll: 6 Temperature: 15 ... Tilt: 15
I need to then extract only relevant information, such as the numerical integer that specifies the heading, pitch and roll. I'm sure I could buffer the data and then look at each character individually, but that seems rather computationally inefficient. Any idea how to approach this problem?
Also bear in mind that the Mega is going to be in real-time communication with a VB.NET GUI via another serial connection, so if possible I would like a method that does not interrupt this process.
Thanks in advance