-
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
A public method to check if the chip is connected #272
Comments
I don't see much harm in something like this, except would it be useful to include it in the isValid() function? |
I have started using this patch for my work. It would be great if it could be accepted in the official version. |
This would have saved me great deal of time and work. Would be good addition in the library. |
Pull request has been accepted and merged. |
Hi, when could you use this function? I mean, I always configure all the stuff arround RF24 in my SETUP. But I don't know if you could check in the LOOP part if "isChipConnected" and if it is not, reset it (may be mosfet) and reconfigure it again. An example will be great, thanks. |
I use it in setup only to see if the chip is connected. Chips wouldn't normally get connected/disconnected while the program runs. For example, I have the option to have one or two connected for optional diversity. In setup I check for both, then use whichever one is present, or use both for receiver diversity if they both exist. This way I don't have to edit code for the various configurations I support. |
Sometimes I get my module "blocked" so I thought that with this new function I could check if it is "death" or "alive". I think my problem has another source, hasn't it ? |
Yes I think your issue is something else. If the chip is "crashing" then
maybe poor power supply or perhaps for some reason the tx and or rx
queues are filling. Maybe something else but these are the first things
that come to mind
|
Would it be a good enhancement to expose a public method that will check if the nRF24 chip is connected to the SPI bus and powered on?
As discussed in #213, when the chip is not connected (or is damaged or so) then SPI reads mostly 0x00 or 0xFF value from it. To check if the chip is really connected and running we could read the value of some specific register. By some specific register I mean the register that we know for sure that its value MUST be different than 0x00 or 0xFF. We could use a SETUP_AW register as according to the specs its value will never be 0x00 nor 0xFF:
I would appreciate that method (like bool RF24::isChipConnected()) as it will make it easier to check if chip is connected without calling the begin() again.
The text was updated successfully, but these errors were encountered: