How does the ackPayload system work?

Do writeAckPayload() and isAckPayloadAvailable() operate as a parallel (or bypass) communication system independent of write() and read() ?

Working with RF communication (nRF24L01s using TMRh20 RF24.h) between two UNOs: if Program1 writes to program2; program2 reads the message and writeAckPayloads to program1; program1 can look for a message ( isAckPayloadAvailable ) and read it; all independent of mainstream communication?

Ack payloads are a handy way to return data back to senders without manually changing the radio modes on both units
isAckPayloadAvailable Determines if an ack payload was received in the most recent call to write().
isAckPayloadAvailable Calls read() to retrieve the ack payload so Calling this function clears the internal flag which indicates a payload is available. If it returns true, you must read the packet out as the very next interaction with the radio, or the results are undefined.


By the way - I'm just copying from the doc... a good practice is to read the doc :slight_smile:

Thanks J-M-L

I, too, know the meaning of the acronym RTFM :wink:

Sadly, my reference material (the TMRh20 version) does not include the magic line, "If it returns true, you must read the packet out as the very next interaction with the radio, or the results are undefined."

This may, indeed, be my solution.

Thanks

fair enough :slight_smile:

Different library though - I extracted the info from https://github.com/maniacbug/RF24