NRF24L01!
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
NRF24L01!
Hi !
I can see that in FC7 included component NRF23L01 . I really like to use it, but I have no experience with this and don´t know how to start.
Before I started to experiment with this and spend hours on it, I'll hear about the MM has tested the component.
And please a litlle starthelp,
What is Pipeadress? Openwriteadress, Openreadingadress and setPipeAdress and how to use. Has it something to do with identification, node?
I know MM guys is busy, but how long is the schedule for the help function for FC7? And will there be, as in FC6 get some good examples of the different components. A simple example of just sending and receiving a number would be fine.
Thank´s in advance
Best regard
Jorgen
I can see that in FC7 included component NRF23L01 . I really like to use it, but I have no experience with this and don´t know how to start.
Before I started to experiment with this and spend hours on it, I'll hear about the MM has tested the component.
And please a litlle starthelp,
What is Pipeadress? Openwriteadress, Openreadingadress and setPipeAdress and how to use. Has it something to do with identification, node?
I know MM guys is busy, but how long is the schedule for the help function for FC7? And will there be, as in FC6 get some good examples of the different components. A simple example of just sending and receiving a number would be fine.
Thank´s in advance
Best regard
Jorgen
- 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!
Hi Jorgen,
I'll see if I can get some examples created for you.
I'll see if I can get some examples created for you.
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: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi Ben!
Thank you. I Will be really gratefull. Only a simple examble, maybe to Remote control an output, on/OFF.
Best regard
Jorgen
Thank you. I Will be really gratefull. Only a simple examble, maybe to Remote control an output, on/OFF.
Best regard
Jorgen
- 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!
Hi Jorgen,
I really didn't like the current state of the component. The code came from an Arduino library and it just felt a bit too unwieldy and complicated.
So I've re-written the component to heavily simplify it based on the working example posted here by MJU.
http://www.matrixtsl.com/mmforums/viewt ... l01#p71942
The latest component file is here, simply copy the file to your "Flowcode 7/Components" directory and restart Flowcode. Here are some example programs to show you how to send and receive data. A new updated wiki page has been created for the new component here.
http://www.matrixtsl.com/wikiv7/index.p ... (Wireless)
Let me know how you get on.
I really didn't like the current state of the component. The code came from an Arduino library and it just felt a bit too unwieldy and complicated.
So I've re-written the component to heavily simplify it based on the working example posted here by MJU.
http://www.matrixtsl.com/mmforums/viewt ... l01#p71942
The latest component file is here, simply copy the file to your "Flowcode 7/Components" directory and restart Flowcode. Here are some example programs to show you how to send and receive data. A new updated wiki page has been created for the new component here.
http://www.matrixtsl.com/wikiv7/index.p ... (Wireless)
Let me know how you get on.
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: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi Ben!
Thank you thank you, very much for your big job. I am not home before the weekend, but as soon I am home I make a test with your component and program and you hear from me.
Great
Jorgen
Thank you thank you, very much for your big job. I am not home before the weekend, but as soon I am home I make a test with your component and program and you hear from me.
Great
Jorgen
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi Ben!
Unfortunately it is not working.
Let me tell you what I have done.
RX:
First I overwrite the fcdx file in the component lib. Then I programmed the chip and I can see that is running, while in the display I see "Init OK". For the rx module I have exactly 3,3 Volt for supply, and I have added a 10uF capacitor on the supply for the module. ( can see in different forum they recommend this) Check and check the wiring again. The only thing I not have connected is IRQ.
TX:
The same have I done on the TX. I also suppose that the program is running there, because when I press a digit on the keypad A0 go high. I can see with my scoope a short puls is coming out on the different data pin when I press a digit on the keypad.
The NRF module is new and the distance between them is max 1 Meter.
Sorry!
Br. Jorgen
Unfortunately it is not working.
Let me tell you what I have done.
RX:
First I overwrite the fcdx file in the component lib. Then I programmed the chip and I can see that is running, while in the display I see "Init OK". For the rx module I have exactly 3,3 Volt for supply, and I have added a 10uF capacitor on the supply for the module. ( can see in different forum they recommend this) Check and check the wiring again. The only thing I not have connected is IRQ.
TX:
The same have I done on the TX. I also suppose that the program is running there, because when I press a digit on the keypad A0 go high. I can see with my scoope a short puls is coming out on the different data pin when I press a digit on the keypad.
The NRF module is new and the distance between them is max 1 Meter.
Sorry!
Br. Jorgen
- 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!
Hello,
Right I'll get my fine comb out and see if I can spot any problems in the code. I also have some of these modules at home so if I get time I will double check things at my end. I have one module sat in front of me on my desk, however one is not enough to do anything meaningful other than check the initialise comms are ok.
Right I'll get my fine comb out and see if I can spot any problems in the code. I also have some of these modules at home so if I get time I will double check things at my end. I have one module sat in front of me on my desk, however one is not enough to do anything meaningful other than check the initialise comms are 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: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
- 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!
Right I've made a test rig and been through the code carefully now.
I have found two problems with the current component code.
1) There was no SPI prescaler property so no way to control the SPI speed. This has now been added.
2) The CE pin was being driven high at the end of the RX init in MJU's example and I had missed this. This has now also been added.
Even with the two improvements listed above it's still not working for me? Hmmm.
Latest component file.
I have found two problems with the current component code.
1) There was no SPI prescaler property so no way to control the SPI speed. This has now been added.
2) The CE pin was being driven high at the end of the RX init in MJU's example and I had missed this. This has now also been added.
Even with the two improvements listed above it's still not working for me? Hmmm.
Latest component file.
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!
Scratch that, it's working now.
Had missed another pin change in the initialise.
Here are the working examples, note that the FIFO size is 32 bytes, I think this is important so I'm going to try and make this more flexible now.
Edit: Yes confirmed buffer sizes other than 32 bytes don't work. I'll see if I can find a way to edit this but for now it works well if you always send and receive 32 bytes at once.
Had missed another pin change in the initialise.
Here are the working examples, note that the FIFO size is 32 bytes, I think this is important so I'm going to try and make this more flexible now.
Edit: Yes confirmed buffer sizes other than 32 bytes don't work. I'll see if I can find a way to edit this but for now it works well if you always send and receive 32 bytes at once.
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: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 times
- Contact:
- 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!
Hello Enrique,
Sorry this is a new component for Flowcode v7 and so not available in Flowcode v6.
We still support Flowcode 6 but we won't be generating any new content for it.
The v7 component is based on the v6 example by MJU.
http://www.matrixtsl.com/mmforums/viewt ... 78&p=71942
Sorry this is a new component for Flowcode v7 and so not available in Flowcode v6.
We still support Flowcode 6 but we won't be generating any new content for it.
The v7 component is based on the v6 example by MJU.
http://www.matrixtsl.com/mmforums/viewt ... 78&p=71942
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: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 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!
Hi Ben
On your FC component properties you have Port D.1 connected to SCK and on the bottom line its called CLK Remap. Why the 2 different names?
On your FC component properties you have Port D.1 connected to SCK and on the bottom line its called CLK Remap. Why the 2 different names?
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi Ben!
I have first seen your corrections now. I Will run a test tomorrow evening. I dont know if Johns observations have Any influence on the program.
Thank's in advance to both of you.
Yes Enrique, buy FC7. Many good benefits, and among this, fast compiling.
Br. Jorgen
I have first seen your corrections now. I Will run a test tomorrow evening. I dont know if Johns observations have Any influence on the program.
Thank's in advance to both of you.
Yes Enrique, buy FC7. Many good benefits, and among this, fast compiling.
Br. Jorgen
- 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!
Hi John,
On the microcontroller I am using the SPI is "Remappable" meaning you can shift the pins around which then creates the second set of properties.
The First greyed out SCK pin is our usual this is where the SCK is connected to indicator.
The second none greyed out SCK pin assigns where we are mapping the SCK pin and should be reflected by the first greyed out property.
Ideally there shouldn't be two properties but I didn't just want to hide the standard SCK property in case that confused anyone.
The three hardware SPI pins MOSI, MISO and SCK are greyed out and set by the internal wiring of the microcontroller.On your FC component properties you have Port D.1 connected to SCK and on the bottom line its called CLK Remap. Why the 2 different names?
On the microcontroller I am using the SPI is "Remappable" meaning you can shift the pins around which then creates the second set of properties.
The First greyed out SCK pin is our usual this is where the SCK is connected to indicator.
The second none greyed out SCK pin assigns where we are mapping the SCK pin and should be reflected by the first greyed out property.
Ideally there shouldn't be two properties but I didn't just want to hide the standard SCK property in case that confused anyone.
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
- 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!
The boards should be here tomorrow.
I've ordered a pair of Sparkfun BOB's with a SMA connector and built in voltage regulator so they can be run from the 5v supply and a pair of 2.4GHz rubber duck aerials to match.
At least I will know they are going to work. (unlike a Chinese special that may have problems )
Hopefully I will get a decent signal between them too with these aerials. (2.2dBi Gain)
Will post my results once tested.
I've ordered a pair of Sparkfun BOB's with a SMA connector and built in voltage regulator so they can be run from the 5v supply and a pair of 2.4GHz rubber duck aerials to match.
At least I will know they are going to work. (unlike a Chinese special that may have problems )
Hopefully I will get a decent signal between them too with these aerials. (2.2dBi Gain)
Will post my results once tested.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi Ben and john!
In contrast to the first exemplary Tx and Rx was all set. Both in chip and component macro.
Now I can´t find in component macro TXmode and RX, where I have to place the
adress :
0x11
0x11
0x11
0x11
I thing I wait until I can test with John´s examble, if ok. I have not experience with these device. Thank´s John.
Best regard
Jorgen
In contrast to the first exemplary Tx and Rx was all set. Both in chip and component macro.
Now I can´t find in component macro TXmode and RX, where I have to place the
adress :
0x11
0x11
0x11
0x11
I thing I wait until I can test with John´s examble, if ok. I have not experience with these device. Thank´s John.
Best regard
Jorgen
- 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!
Hi Jorgen
I've not used these yet myself will be starting with Bens sample flowcharts and go from there.
Should be interesting project.
I've not used these yet myself will be starting with Bens sample flowcharts and go from there.
Should be interesting project.
1 in 10 people understand binary, the other one doesn't !
- 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!
Hello,
The address is set in the examples as part of the SetTxMode or SetRxMode macros.In contrast to the first exemplary Tx and Rx was all set. Both in chip and component macro.
Now I can´t find in component macro TXmode and RX, where I have to place the adress :
0x11
0x11
0x11
0x11
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
- 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!
My new NRF2401 boards & aerials have arrived.
Tested using Bens component and FC programs, Though tweaked to use a pair of EB006V9s and PIC16F1937's as I don't have a EB091.
Pleased to report it works fine sat on the bench. Now to see what sort of distance it will connect over.
Tested using Bens component and FC programs, Though tweaked to use a pair of EB006V9s and PIC16F1937's as I don't have a EB091.
Pleased to report it works fine sat on the bench. Now to see what sort of distance it will connect over.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi John!
Glad it work´s for you. Do you want to share your (Ben´s) testprogram. Then I know for sure that these file you have testet work´s and all config is ok?
Yes mine is from Ebay, maybe I should buy some like yours.
Thank´s in advance
Jorgen
Glad it work´s for you. Do you want to share your (Ben´s) testprogram. Then I know for sure that these file you have testet work´s and all config is ok?
Yes mine is from Ebay, maybe I should buy some like yours.
Thank´s in advance
Jorgen
- 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!
Hi Jorgen
You are welcome to the test programs.
They are basically the same as Bens, except they are for a 16F1937
Ben's programs are further up the page.
Pin Outs
EB006 - RF Board
C2 - CE
C3 - SCK
C4 - MISO
C5 - MOSI
C7 - CSN
The boards were about £15.00 each and the rubber duck aerials about £4.00
Plus having a 5V regulator on board they can run directly of the EB 006 without any extra components.
You are welcome to the test programs.
They are basically the same as Bens, except they are for a 16F1937
Ben's programs are further up the page.
Pin Outs
EB006 - RF Board
C2 - CE
C3 - SCK
C4 - MISO
C5 - MOSI
C7 - CSN
The boards were about £15.00 each and the rubber duck aerials about £4.00
Plus having a 5V regulator on board they can run directly of the EB 006 without any extra components.
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 311
- Joined: Sat Jan 12, 2008 2:08 am
- Has thanked: 104 times
- Been thanked: 47 times
- Contact:
Re: NRF24L01!
HI Jorgen, John and Benj
You know the maximum distance range of NRF24L01 using it on the street
I'm using ZigBee mentioned a range of 1 km but in the city is 80 meters and the cost is 40 dlls each; and the nrf24l01 have to cost of 3 to 5 dlls each. . .
Thanks
Enrique
You know the maximum distance range of NRF24L01 using it on the street
I'm using ZigBee mentioned a range of 1 km but in the city is 80 meters and the cost is 40 dlls each; and the nrf24l01 have to cost of 3 to 5 dlls each. . .
Thanks
Enrique
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: NRF24L01!
Hi all!
Thank's John for sharing. I'll test it later today.
And Enrique, yes I know all these small devises, but no have no experience with these, but like to learn about it, i Think they are a little tricky.
Br
Jorgen
Thank's John for sharing. I'll test it later today.
And Enrique, yes I know all these small devises, but no have no experience with these, but like to learn about it, i Think they are a little tricky.
Br
Jorgen