Go Down

Topic: nRF24L01 wireless communication (Failed) (Read 1 time) previous topic - next topic

Robin2

Are both boards working at full power?
How far apart are they?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

GhostInThePistachio

Okay I know this is very old, but since there was no final answer and I just hit something much the same I wanted to share what I found. 

Using
  radio.setDataRate( RF24_250KBPS );
  radio.openWritingPipe(slaveAddress);

and the sketch works.  Omitting the "radio.setDataRate" causes the same issue, TX Failed.

This is contrary to the library source code which states that the speeds will be set with the radio.begin (lines 659 - 661 of RF24.CPP.

So regardless of what the docs say, you will need to set the DataRate for the tx to work.

Robin2

#17
Sep 17, 2017, 11:26 am Last Edit: Sep 17, 2017, 11:27 am by Robin2
So regardless of what the docs say, you will need to set the DataRate for the tx to work.
All my examples set the data rate. I can't remember if I ever tried a program where I did not set it.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

GhostInThePistachio

All my examples set the data rate. I can't remember if I ever tried a program where I did not set it.

...R
You are very smart, for noobs like myself I take your tagline to heart:  "Two or three hours spent thinking and reading documentation solves most programming problems." (RTFM!) In this case documentation caused the problem. 

Looking at the tmrh20 github class page "setDataRate" is listed under Optional Configurators.  It even goes so far as to say "None are required. Calling begin() sets up a reasonable set of defaults.". 

Testing has proven otherwise.  It's what caused the OP's issue I think and thought I'd share the information for anyone else who hits it.  I believed it was optional and was pulling my hair out trying to figure why I couldn't transmit data when I wrote my own sketch following the docs vs copy and pasting.

Go Up