Electron, nRF24L01 and Pro Mini

I am attempting to build some wireless sensors that use a Mini Pro and nRF24L01 and MPU6050 to send data (position of the MPU6050) back to an Electron that also has a nRF24L01 connected to it to recieve the data. When I use the equivalent code I can receive data to a Mega from my sensor. Using the Electron, I cannot receive the data. I found quite a few posts about the Photon, but nothing related to the Electron. Has anyone been able to accomplish what I am trying to do? I would appreciate a nudge in a direction if someone can provide that.

Thanks in advance.

If you got Photon code, 90+ percent of that will be applicable to the Electron too.
What part of the Photon posts in particular would you think doesn’t apply to the Electron?

We have the RadioHead library working on the Photon / Electron now and that library has support for the NRF24 radios.

Check out this thread: Particle Photon / Electron + RFN95W Long Range Radio

We have the NRF95w radios working on a Photon. I’ve been running a test on a Photon and RFM95 radio communicating with another NRF95w radio for almost a week straight now. So I can confirm the RFM95 radios work just fine.

1 Like

Thanks for the reply. Its not that I dont think they apply, simply there is nothing (that I can find anyway) specifically using the Electron. Since I am using the Electron and I cannot achieve RX of the data from my sensor, I thought it appropriate to point that out.

Thank you also for your information and the link. I will take a look and perhaps this solves my issue. I have been using particle-rf24.h on the Electron.

Thanks all for the help

1 Like

@RWB how did you add the RadioHead library? I cant seem to locate the steps to do that.


We used the Particle DEV IDE on Windows which makes it a lot easier to load libraries with tons of files. It’s not something you want to do via the Online Build IDE.

What we needed to do was download the radio head library and then follow what we did in this thread:

You may want to switch to RFM95w radios if you just want something that works because I have those radios modules working 100% on my end and you can always turn the TX power down to save power.

1 Like

Wow, I think it may be time to go back to Arduino. This could not be any more complicated if you tried! The documents appear to be outdated. The information that I can find about loading libraries doesnt look anything like what I see. It looks like there used to be a way to upload a library in the old IDE but not any more. I cannot even locate in the Particle Dev where or how to upload the RadioHead library for starters.

Just so I understand, the thread you sent me to is for the LoRa radio you are using so therefore it does not apply to the nRF24L01?

I appreciate your help and guidence. Time for a break. I have spent the better part of a day to get a headache!

Arduino sucks compared to the Photon and Electron IMHO. I started with Arduino.

Did you get the Particle DEV software installed?

Did you get the Radio Head Library Downloaded?

If so I’ll show you what to do next, it’s super simple and I bet you will end up only using Particle DEV in the future.

@RWB LOL, thanks. Yes, I have the DEV software downloaded and installed. I also have the RadioHead library downloaded.

Now Unzip the RadioHead library to a location where you know where to find it.


If you wish I could guide you through the library contribution process using CLI.
IMO it now is easier than it used to be in Web IDE.

(just not today - middle of the night here :wink: and some cool off time too :sunglasses: )

@ScruffR, you are a good man. I appreciate that and I will take that offer when you are available and have time for me
Thanks very much

1 Like

Now hit the open folder button under file in DEV

Then navigate to the folder that contains the Radiohead library and open it.

You are correct, that was super simple! LOL

1 Like

@RWB So, thanks to you :relieved: I was able to get the library loaded. I also was able to flash the following examples OTA to my Electron
rf24_server.pde, rf24_reliable-datagram_server.pde and rf24_reliable_datagram_client.pde. The diagram below shows how I have the radio wired to the Electron. Regardless of which example I used, I did not see any output in the serial monitor on Com3 @ 9600. Hoping you might have a suggestion or see something I missed?

Thanks again for your time. It is appreciated.

I have no idea.

You have CE PIN as B2 , should that be D2?

Post your code so we can see also.

I would get the RFM95w radios since the range is SO much better and you have verified code to work with.

Thanks for the reply. I will double check the pin assignment you have suggested. I have been going around in circles for so long with this I dont recall where I came up with B2? LOL

I can post the code if you like but I am only using the example codes provided in the RadioHead ff24 folder. Advise if you want me to post it please.

The reason I am using the rf24 is cost. My project will use 6 sensors each so it can add up in a hurry. I appreciate your suggestion though.

Post your code, I have a few nrf24 radios here that I can try to mess with.

How far away are you wanting the radios to work? Testing was done on these earlier and indoor range sucked.

The RfM95 modules can be bought for $10 each.