Go Down

Topic: NRF24L01 with 32 bit Data with DUE SPI working slower. (Read 145 times) previous topic - next topic

EJLED

Hi, all member.

I am interfacing NRF24L01 wireless radio link  with DUE board using SPI protocol.

I am trying to transfer the 32 bit data using SPI to NRF24L01 at transmitter side and same at receiver side.

I have attached the test code, it is working ok. but the issue with this code is its too slower. it takes almost 20 seconds to transfer data from transmitter and receiver.

kindly correct me what is going wrong in the code. is there any way to send all this within 2 seconds?

TIA

weird_dave

Your for loops are broken, uint8_t is 8 bits, 23000 doesn't fit. Use uint16_t

You're sending 23000 arrays!
The 2nd for loop isn't needed, just do:

myRadio.write(&dataArray,sizeof(dataArray));


I would change 'd' to something with readable ASCII codes in it.

EJLED

Ok, can u tell me what causes the data transfer slower? is it due to 2nd for loop as you mentioned? any scope in improving the transmission and reception speed.?

weird_dave

Fix the problems first and then tell us the time it takes, those for loops aren't even guaranteed to finish!

Go Up