edgemoron:
Did you mean:Serial.println(sizeof(rxTxData));?
That will always return 4, 4 bytes in a long integer.
This was only a test, to see if there is something wrong with the payload length.
My problem is that the data is two times available. The first time it prints the correct data "211", but afterwards it prints the "0".
For me it seems like the buffer of the NRF24L01 is not cleared.
wildbill:
Guessing: could it have anything to do with the fact that the full 32 byte packet is being transmitted padded with zeroes? Take a look at setPayloadSize.
This is a good idea.
I will try to add the parameter to my code and test it.
Is it correct to set the payload size to a length of 4 if I transmit a long?