Hex Data Stream
-
- Posts: 11
- Joined: Mon Feb 08, 2021 6:09 pm
Hex Data Stream
I have a hex Data stream of 25 bytes. How can I store these bytes without the use of serial.read_IOBUFF (Cicciocb is working that problem)? Also is there any function that I can use to convert Hex Bytes to Decimal or any software routine to do the conversion? Using ESP 8266 Help!! appreciated
- Electroguard
- Posts: 836
- Joined: Mon Feb 08, 2021 6:22 pm
- Has thanked: 268 times
- Been thanked: 317 times
Re: Hex Data Stream
How to "store" the incoming data is easy (variables, array).
How to "read" the incoming stream is another matter - it could be read a byte at a time for 25 bytes worth then saved, but if any of the incoming bytes is 0 it will be interpreted as a numeric null and probably mess up the byte count.
I did a project for reading incoming data from a GPS module which perhaps might help...
https://sites.google.com/site/annexwifi ... ct-1---gps
How to "read" the incoming stream is another matter - it could be read a byte at a time for 25 bytes worth then saved, but if any of the incoming bytes is 0 it will be interpreted as a numeric null and probably mess up the byte count.
I did a project for reading incoming data from a GPS module which perhaps might help...
https://sites.google.com/site/annexwifi ... ct-1---gps
-
- Posts: 11
- Joined: Mon Feb 08, 2021 6:09 pm
Re: Hex Data Stream
When serial.IOBUFFER is made available will ascii 0 still mess up the byte count? Out of the 25 byte input at least half of the bytes could be 0.