Photon nRF24L01 library use PARTICLE-RF24

Sharing to hopefully save someone else from the troubleshooting I went through.

I was trying to used the ported Maniacbug RF24 library with a Photon…and it doesn’t work! (Mistakenly I thought it may work because the datasheets indicated the same SPI, and I even changed the Divider to increase for clock speed on the Photon.)

However, the ported TMRh20 RF24 library does work with the photon: Particle-RF24

Like the instructions for https://github.com/technobly/SparkCore-RF24 in the Web IDE create new files (+ icon on far right) and copy and past the RAW contents from the Particle-RF24 library files. It won’t compile initially. Just delete the line or comment it out referencing the include for “particle-rf24/particle-rf24.h” in the gettingstarted.ino example file.

Symptoms of the Technobly/ManiacBug library include the Photon initially connecting to wifi then going offline with a flashing green light (but sometimes if the serial command T or R are sent early on it remains online).

Also, it appears like in receiver mode receiving data…but if you look at the actual data it is not a time sequence. Often the same number is repeated many times. In sender mode it is also weird. Mostly it says the sending fails. However, if you actually physically remove the RF radio it then reports to send successfully.

I’m not sure what it means, but if you look at the print details under the ManiacBug ported library the RX_ADDR_P0-1 is “0x40 0x40” not even preceded by an “=” sign. The other registers appear to be set correctly however the RX address is NOT the address specified in the example code.

When the Particle-RF library is used the print details shows the correctly set RX address.

Next I will integrate this in my sensor app and see how it works outside of the example app.