Hi together,
using a NANO I'll connect it with a machine.
This sends a "telegram" of ~ 400 bytes - mostly every 10 seconds.
I can detect the beginning of this data stream but read only the content of the input buffer (~60bytes).
How can I receive the whole length of the telegram and store the characters in a buffer[] ?
Regards
Peter
Which kind of telegram ?
If it has a start byte, it most likely also has a stop byte and this way you can determine precisely when to stop reading input data and then process.
The structure is "@......data ......#". It comes with 9600 b/s.
My problem is how to read the complete data and not only the first 64 bytes in the input buffer.
??
By writing code that reads it. The fact that you are asking, means your code simply doesn't work, it has bugs or a major design flaw. Please post it.
Hello pgroener
Consider the "Serial Event example" to be found in the IDE.
Have a nice day and enjoy coding in C++.
GREAT!
That's what I'm looking for!!
Thanks a lot.
Thread ist closed.
Essentially you will "look" for the "@" character and read character-by-character until you receive a "#", line-feed, carriage-return, or another "@" character.
Look at any GPS code that begin the sentences with "$".
GPS NMEA 0183 Messaging Protocol 101 | Arduino Documentation | Arduino Documentation
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.