[Request - Answered] nRF24L01+ library

I checked the second post and at a glance…I have no edits but do greatly appreciate the effort you’ve put into this. I’m following along with you and am looking forward to have my pro micro wirelessly reporting sensor data to my photon! Thanks again.

Sensors’ firmware article is out… I already have the Arduino hub firmware ready and I’ll start working on the Particle firmware very soon.

1 Like

Question on the hub code: should I use additional libraries like IntervalTimer or elapsedMillis and reduce the code, or should I keep the dependencies as little as possible?

If those libs make the use of nRF24 easier, then I say use them. No sense in recreating something that already exists. If someone chooses not to use the lib then they can implement their own timer but being able to consume a lib is generally easier than writing your own timers.

@LukeUSMC actually I would be using them just to periodically reset the counter :smile: like replacing these lines with one using elapsedMillis…

I’m planning to use interrupts for the network auto configuration in a more advanced post, but that’s advanced stuff that might come in later on :smile:

1 Like

Thanks for the write-ups you’re doing. They are very helpful. What’s the version of Fritzing software for the hub.fzz file? I can’t seem to open them in the software I downloaded from their website.

Thanks,
KC

Fritzing is version 0.9.2b, but you might need the nRF24L01 part to be able to see the radio transceiver…

When is the next installment? I’m getting antsy…

sorry, got stuck again… I need to finish an OSH board (anybody willing to help, even if it’s not Particle based?), finish a task for my second job and carry on with my main job…

I got stuck at scaling up the sensor network to 20 nodes: I’ve run out of nfr24 :smiley:

The scale up is requested to prove the firmware is actually working as apparently some doubts have been raise

Apologies lads, but I need days 30hrs long… :tired_face:

1 Like

@rlogiacco I took a look at your git hub to see if you had the hub running on the photon, and I did not notice any code there. Have you gotten the hub to run on the photon?

A little update: I’m getting closer to my goal as I now have a CNC milling machine at hands and I can now fabricate the little boards I need to actually scale up my sensor network and prove my idea.
I haven’t abandoned the idea, just got stuck in multiple tasks.

@Bspranger I didn’t push anything about the photon yet, but the plan is to use the PARTICLE-RF24 library, which is a porting of the TMRh20/RF24 library I’ve been using on the Arduino. The hub code will practically be the same, with only the changes necessary to the pinout and such.
It should be really straightforward, but I will do it as soon as I’ll get my verification process done.

Thanks for the response. I didn’t realize there was already a library ported to the photon. Sweet!

I am just formulating ideas so I havent started coding yet.

@rlogiacco any update on the photon + nRF with the PARTICLE-RF24 library? I am attempting something similar and cannot get the mini pro talking to the electron using this library. Using the equivalent code and a mega, it works fine. I am stil searching for a solution.
Thanks

When using “the equivalent code and a mega” do you mean the Mega replaces the Pro Mini or the Electron?
Which difficulties are you encountering?

I am using a pro mini+nRF+MPU6050 (TX) to collect data and then try to send it to Electron (RX). For some reason I cannot RX the data sent to the Electron. If I use the same TX set up and then use a mega for my RX it works. I would guess that the issue is in the particle-RF24.h library but I do not know how to fix it. @RWB has suggested using the RadioHead.h library. In the mean time, I had located your post.

Thanks for your reply

Are you using serial1 or just serial to read the RX?

What is the payload you are sending/reading?

Are you aware you are using two different architectures? I mean, an int for an Arduino or a Mega is not the same data structure for the Photon / Electron… The former are 8bit processors, the latter 32 bits.
This means you can send an integer as a 16 bits sequence, but the latter will read only blocks of 32 bits… I’ve learned communication between two different architectures can be quite challenging unless you consider the byte representation in the proper way…

BTW, I have used efficiently the PARTICLE-RF24 library using structured data payloads, but only after ensuring the payload is 32 bits padded and the data types match properly.

@RWB

This is a snipet from my RX code