Compare hex values received via serial

you can read complete packets and process the ones your interested in

you can read one byte at a time until you receive the "start" byte, F5. then read the length byte and continue to read that many bytes into a receive buffer. once the complete packet received process it.

that processing depends on the "command type" of the packet. undesired packets are simply discarded. of course the data from a desired packet is accessible from the receive buffer.

2 Likes