NRF24L01+ 2.4gHz communication
Moderator: Benj
Forum rules
Only feature requests will be considered here. General questions should not be posted in this forum.
Only feature requests will be considered here. General questions should not be posted in this forum.
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
NRF24L01+ 2.4gHz communication
Don't know if this qualifies as a feature but I would like to suggest a component is made for these. I have tried my hand at these but there are so many routines and macros needed to get this to work with even the most basic features/functions. That's why I think it would be a good candidate for a actual component. That and the fact that they are dirt cheap. I bought these two for $10 US including shipping: http://www.ebay.com/itm/161130096510?ss ... 1439.l2649
Some library for these on the Arduino: http://maniacbug.github.io/RF24/
Datasheet: http://www.nordicsemi.com/eng/content/d ... on_1_0.pdf
And the pinout of these common modules (available with either PCB antenna or SMA):
Some library for these on the Arduino: http://maniacbug.github.io/RF24/
Datasheet: http://www.nordicsemi.com/eng/content/d ... on_1_0.pdf
And the pinout of these common modules (available with either PCB antenna or SMA):
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
I've got a couple of these in the bit box myself.
Picked them up on ebay for a few £ but not had time to start and look at them yet.
As they are only a few mW output power they are licence free. (UK anyway)
Mine have the PCB antenna.
Picked them up on ebay for a few £ but not had time to start and look at them yet.
As they are only a few mW output power they are licence free. (UK anyway)
Mine have the PCB antenna.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
I had a go a while back but couldn't get these to work even a little bit
As any FC supported Wifi modules are VERY expensive I think these would be great alternatives in many cases. Allowing several nodes to communicate with one master that can then upload data or whatever via WIFI/GSM/Ethernet making it much cheaper.
Here's to hoping support will be added again, I can do some testing and such, to help out.
Thanks
/Daniel S
As any FC supported Wifi modules are VERY expensive I think these would be great alternatives in many cases. Allowing several nodes to communicate with one master that can then upload data or whatever via WIFI/GSM/Ethernet making it much cheaper.
Here's to hoping support will be added again, I can do some testing and such, to help out.
Thanks
/Daniel S
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Here is another link to what seems to be a pretty good library and tutorial for the NRF24L01+ modules:
http://maniacbug.wordpress.com/2011/11/ ... rted-rf24/
http://maniacbug.wordpress.com/2011/11/ ... rted-rf24/
-
- Posts: 528
- Joined: Sat Dec 01, 2012 1:23 pm
- Location: Sweden
- Has thanked: 49 times
- Been thanked: 101 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Have you tried these out yet Ben? Or are you stuck with the 3D printer?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hello,
Its on the list and I have one of the modules currently sat on my desk. Hopefully get around to looking at these soon but please keep posting reminders if it slips my mind as I've got a lot to dig through at the moment and not the best memory
Its on the list and I have one of the modules currently sat on my desk. Hopefully get around to looking at these soon but please keep posting reminders if it slips my mind as I've got a lot to dig through at the moment and not the best memory
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hi BenJ,
Just a reminder...
Just a reminder...
Benj wrote:but please keep posting reminders if it slips my mind as I've got a lot to dig through at the moment and not the best memory
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hello,
Yep I've still got one on my desk and not managed to get it out the bag yet. To be honest the ESP wifi devices totally distracted me off the subject.
I'll put it back on my list to have a look at these and try to make a component.
Yep I've still got one on my desk and not managed to get it out the bag yet. To be honest the ESP wifi devices totally distracted me off the subject.
I'll put it back on my list to have a look at these and try to make a component.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hello,
I'm quite far on with this now, nearly at the end but the demo code is quite complicated in terms of pipes and pointers and I need to focus on other things this afternoon. So probably sometime next week I will have a workable component.
I'm quite far on with this now, nearly at the end but the demo code is quite complicated in terms of pipes and pointers and I need to focus on other things this afternoon. So probably sometime next week I will have a workable component.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Did I ever tell you how great you are?
I really hope you can make a component for this piece of hardware!
Thank you BenJ
I really hope you can make a component for this piece of hardware!
Thank you BenJ
Benj wrote:Hello,
I'm quite far on with this now, nearly at the end but the demo code is quite complicated in terms of pipes and pointers and I need to focus on other things this afternoon. So probably sometime next week I will have a workable component.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Thanks MJU, Much appreciated
I'm still waiting on an email so I've plodded on and created the component and a set of examples. No idea if it works or not in practise but it does at least compile so that's a start. Also note that it was a liquid lunch today to say goodbye to Mark so that's probably had an effect
Here is the component which will need to be placed here "C:\Program Files (x86)\Flowcode 6\components"
And here is an example of sending and receiving data. The TX program simply sends out strings one after another with delays. The RX program listens for data and if it receives some will display it on a LCD.
If anyone tries this on the hardware then please let me know how your getting on. Fingers crossed it will all fire up and work correctly but there may be bugs lurking.
I do have some of these modules to hand so I can rig up a circuit and try it if anyone is struggling. However I can't do it right now as for some reason I only left myself one module at work and one module is not enough to test communications! DOH.
If anyone does try it and your getting nowhere with the examples then something to try might be to change the characteristics of the SPI connection (polarity, phase, sample point). To do this click View -> Component Debugger then tick the box "Expose full component tree" then in the properties window you can access the CAL_SPI component properties using the drop down menu at the top of the window.
Also note that the module is 3V3 only, for simplicity I would test using a 3V3 micro to remove the need for extra level shifting circuitry. Saying this the datasheet does say that if you power from a 3V3 voltage source then the signals can be as high as 5.25V so this might be ok.
I'm still waiting on an email so I've plodded on and created the component and a set of examples. No idea if it works or not in practise but it does at least compile so that's a start. Also note that it was a liquid lunch today to say goodbye to Mark so that's probably had an effect
Here is the component which will need to be placed here "C:\Program Files (x86)\Flowcode 6\components"
And here is an example of sending and receiving data. The TX program simply sends out strings one after another with delays. The RX program listens for data and if it receives some will display it on a LCD.
If anyone tries this on the hardware then please let me know how your getting on. Fingers crossed it will all fire up and work correctly but there may be bugs lurking.
I do have some of these modules to hand so I can rig up a circuit and try it if anyone is struggling. However I can't do it right now as for some reason I only left myself one module at work and one module is not enough to test communications! DOH.
If anyone does try it and your getting nowhere with the examples then something to try might be to change the characteristics of the SPI connection (polarity, phase, sample point). To do this click View -> Component Debugger then tick the box "Expose full component tree" then in the properties window you can access the CAL_SPI component properties using the drop down menu at the top of the window.
Also note that the module is 3V3 only, for simplicity I would test using a 3V3 micro to remove the need for extra level shifting circuitry. Saying this the datasheet does say that if you power from a 3V3 voltage source then the signals can be as high as 5.25V so this might be ok.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Thanks BenJ
I'm going to try it as soon as my modules arrive.
They should have arrived already :-s
I'm going to try it as soon as my modules arrive.
They should have arrived already :-s
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hello,
Any word on if this component is working with your hardware? I have not got around to testing yet so would be nice to know if I should include the component in the next build or not.
Any word on if this component is working with your hardware? I have not got around to testing yet so would be nice to know if I should include the component in the next build or not.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hello Ben,Benj wrote:Hello,
Any word on if this component is working with your hardware? I have not got around to testing yet so would be nice to know if I should include the component in the next build or not.
I've had almost the same problem as you had earlier.
I received two modules, tried them and one of them was broken so I was left with only one module.
I have ordered four new ones and hoping to receive them soon.
Just today I, by coincidence, received adapter boards to get them powered with 3.3V.
Meanwhile i hope to get a few more modules soon so I can start testing them.
I really really hope they work as good as people say!
When I have the chance to test them I will let you know ASAP.
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hi Benj
doesnt appear to work, looking at the openpipe write macro, it has nowhere to add an adress, whereas the readpipe does, can you check and let us know
Regards
Dazz
doesnt appear to work, looking at the openpipe write macro, it has nowhere to add an adress, whereas the readpipe does, can you check and let us know
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Received the new modules, hooked them up.
Flashed the Flowcode examples from above into two 16F877A's, but nothing happens. :-s (after changing the target).
The modules need 3.3V max but the datalines are 5V tolerant.
Will try in the next few days to find out why..
Flashed the Flowcode examples from above into two 16F877A's, but nothing happens. :-s (after changing the target).
The modules need 3.3V max but the datalines are 5V tolerant.
Will try in the next few days to find out why..
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Didn't see this post..dazz wrote:Hi Benj
doesnt appear to work, looking at the openpipe write macro, it has nowhere to add an adress, whereas the readpipe does, can you check and let us know
Regards
Dazz
Same problem here
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Aha,
Ok I had created a SetPipeAddress macro but not made it public.
The write pipe always uses pipe 0 hence no address.
The read pipe can be 0-5, suggest using 1.
Ok I had created a SetPipeAddress macro but not made it public.
The write pipe always uses pipe 0 hence no address.
The read pipe can be 0-5, suggest using 1.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Hey thank you BenJ..Benj wrote:Aha,
Ok I had created a SetPipeAddress macro but not made it public.
The write pipe always uses pipe 0 hence no address.
The read pipe can be 0-5, suggest using 1.
What is the correct way to set the Pipe-addresses?
I see that the OpenReadingPipe, SetPipeAddress have got Pipe-addresses.
Can I choose them myself?
They are bytes, so can I give them a number between 0-255?
I hope to play with them soon
Thanks for your work!
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
From looking at the code each data pipe has a 5 byte address.
First you need to create the byte array, so create a byte var named.
bytearray[5]
If you pass in a byte array with 5 index locations then it should look like this.
bytearray
Populating the byte array can be done in a calculation icon like this where each value can be 0-255.
bytearray[0] = 1
bytearray[1] = 2
bytearray[2] = 3
bytearray[3] = 4
bytearray[4] = 5
I believe the transmit and receive pipe addresses have to match to allow data to be sent and received at the other end.
First you need to create the byte array, so create a byte var named.
bytearray[5]
If you pass in a byte array with 5 index locations then it should look like this.
bytearray
Populating the byte array can be done in a calculation icon like this where each value can be 0-255.
bytearray[0] = 1
bytearray[1] = 2
bytearray[2] = 3
bytearray[3] = 4
bytearray[4] = 5
I believe the transmit and receive pipe addresses have to match to allow data to be sent and received at the other end.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Ok...Benj wrote:From looking at the code each data pipe has a 5 byte address.
First you need to create the byte array, so create a byte var named.
bytearray[5]
If you pass in a byte array with 5 index locations then it should look like this.
bytearray
Populating the byte array can be done in a calculation icon like this where each value can be 0-255.
bytearray[0] = 1
bytearray[1] = 2
bytearray[2] = 3
bytearray[3] = 4
bytearray[4] = 5
I believe the transmit and receive pipe addresses have to match to allow data to be sent and received at the other end.
On the datasheet page 41 I see the Pipe-address settings.
But in Flowcode I've made a array (byte with 5 values), and filled them with numbers.
Then I try to write this array tot the SetPipeAddress I choose Pipe nr 1 and want to run trough the array with a counter (to set array[counter]), but this doesn't work.
Maybe I'm too tired, but I'm going to stop for now.
If someone has a working example I really want to test it.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
Looks like I need to rig up a working circuit so I can sign off the code.
Here are the updated examples using the latest component with the address in place. Fingers crossed this works. If not then let me know and I will try and do some further tests here.
Thinking about it I have been misdirected by the Arduino code, setting the address as 5 individual bytes would be much easier then passing in an array!
Here are the updated examples using the latest component with the address in place. Fingers crossed this works. If not then let me know and I will try and do some further tests here.
Thinking about it I have been misdirected by the Arduino code, setting the address as 5 individual bytes would be much easier then passing in an array!
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: NRF24L01+ 2.4gHz communication
HI Benj
stoopid question i know but wouldnt it be easier to hardcode the addresses as they are specific to this device, so if you added the set address macro you just need to select the addy you want ie 1 or 2 etc.
stoopid question i know but wouldnt it be easier to hardcode the addresses as they are specific to this device, so if you added the set address macro you just need to select the addy you want ie 1 or 2 etc.
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php