Hi all,
Today I am hacking on some device using serial. I'd like to put the incoming bytes into a string. Looking at the stream of data, it appears that 0x55 is the end of string signal. However, I also see streams where 0x55 appears two times.
Come to think, 0x55 is actually an ASCII character (7) so it could appear in the middle of a stream.
How would I check / confirm that the 0x55 it receives is indeed the end of packet?
Would it be as simple as checking the serial port for more bytes (bits?)? For example, is this a good idea?
if (inChar == '0x55' && Serial.available() == 0) { ... }
This would confirm the terminator was hit and there is no more data? Seems too simple.
Appreciate the input.