I am sending a packet containing 7 bytes. The receiving unit does a LoRa.read() 6 times after each successful execution of LoRa.parsePacket(). What happens to the unread byte #7? Over the past hour I've sent about 400 of these "long" packets and the receiver doesn't show any sign of overflow or other errors. All the packets (first 6 bytes) are displaying corrrectly.
packetSize = LoRa.parsePacket();
if (packetSize) {
sync_byte = LoRa.read(); // user sync byte sent as data
if(sync_byte == 0x69) {
counter = LoRa.read();
t1L = LoRa.read();
t1H = LoRa.read();
t2L = LoRa.read();
t2H = LoRa.read();
}
Does the next received packet clean out the "buffer" or does parsePacket() do that? Or what? I'm thinking of packets as similar to serial communications, where you need to pay attention to either reading or dropping all the bytes in a message.