Hi,
Just a quick simple query with a stream of data I am trying to process but new to Arduino language and wish to implement as simple as possible.
I have a serial string which I am reading through on a Nano on a SoftSerial port (2 and 3). The string format is nnn,nnn.n,aaaa, where nnn is a 3 digit number, followed by another 3 digit number with a single decimal point followed by a checksum. What I need to do is send the string in to a computer (hardware serial on nano) from the device and split the stream and display the first 3 digit number as 'Distance: nnn' and 'Height, nnn.n', ignoring the checksum.
Eventually it is to be sent to a serial line printer but thats a challenge for another day.
Whats the most elegant method to do this? I have tried to hack some GPS code I saw on the internet but am having difficulty in understanding it but know I have to read the stream into a buffer and then strip out the bits I want, but am a little confused....
Thanks