-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RF24::begin(void) always returns false #213
Comments
It should be tested before merging by people with different hardware. |
#213 fix. Seems to be okay when I tested. Hopefully no weird errors rise afterwards.
The mess of code in begin() is due to some suggested changes to detect if setup was successful, but it never worked quite right, so I think removing that code is fine. |
Thanks for merging my pull request. So for now we have the following piece of code:
My source code static analysis and datasheets for both RF24L01 and RF24L01+ shows that after hardware power up (when the power supply is attached) begin() method will return true (for both RF24L01 and RF24L01+ chips) if modules are wired correctly and are not damaged. Another question pops up, related to this code:
So there is an assumption: when read a 0x00 or 0xff value over SPI it may be a clue that there was no response from the module. I have noticed on Arduino: when the module is not wired at all the SPI reads 0xff (like the MISO line was pulled up). However my NodeMCU sometimes reads 0x00 (like MISO was pulled-down) or sometimes returns 0xff (like MISO was pulled-up). What do you think? |
I think I can close this issue now. Now there is a new API method available that is able to check if the nRF24 module is connected, correctly powered up in responsive. |
I have noticed that the RF24::begin(void) always returns false which may confuse a developer who is using this library for the first time. I think commit with SHA b1b8cad comments out a little to much in the RF24::begin(void) function.
I can provide a very simple fix for that.
The text was updated successfully, but these errors were encountered: