This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to send an array of bytes from one NRF24L01 to another?

I know it is a pretty basic question but I can't manage to understand the documentation enough to pass the tutorial predeterminate code. If someone could help and tell where I can find the information about sending an array of bytes from one module to another I'd be very thankful.

Thanks for your kindness!

PD: It is quite imortant for you to know that I'm working with 2 identical Arduino UNOs

Parents
  • As you can see in the code, the bool write( const void* buf, uint8_t len ); of the radio object handle sending. In the example it's sending the timestamp (line 60 and 112) with size of 4 bytes (long). And when receiving you call radio.read() the same way.

    So if you want to send an array, simply put the array pointer in and then the length of the number of bytes, you should be able to send you data array.

Reply
  • As you can see in the code, the bool write( const void* buf, uint8_t len ); of the radio object handle sending. In the example it's sending the timestamp (line 60 and 112) with size of 4 bytes (long). And when receiving you call radio.read() the same way.

    So if you want to send an array, simply put the array pointer in and then the length of the number of bytes, you should be able to send you data array.

Children
No Data
Related