Jump to content
spirilis

[Energia Library] Nordic nRF24L01+ library

Recommended Posts

Hi Spirilis,

 

any thoughts when ths bual receive pipe behaviour might be available? It has been a while and now I should get my development on the way again. Just so I know if this is something that could be available shortly, or should I look for different methods of communication.

 

Tnx for you great development!

Well now you gave me a use-case for that, I'll see about extending the library a bit :smile:

Sent from my Galaxy Note II with Tapatalk

Share this post


Link to post
Share on other sites

Hi Spirilis,

 

any thoughts when ths bual receive pipe behaviour might be available? It has been a while and now I should get my development on the way again. Just so I know if this is something that could be available shortly, or should I look for different methods of communication.

 

Tnx for you great development!

I won't be working on this any time soon.

Share this post


Link to post
Share on other sites

@ RAKSH:

 

Change line 6 in:

 

Enrf24 radio(PE_1, PE_2, PE_3); // PE_1 = CE, PE_2 = CSN, PE_3 = IRQ

 

The Stellaris doesn't know pin P1_0 ....

 

Roche

 

Added my RXdemo for you...  FOR THE STELLARIS LAUNCHPAD LM4F120H5Q

Enrf24_RXdemo.ino

Share this post


Link to post
Share on other sites

Hey,

 

Thank you for the library, it looks much better and seems much easier to use than the Mirf available for the Arduino. So far I've only tried demo sketches on two MSP430 LaunchPads. I would like to make remote control using two StellarPads or a LaunchPad and a StellarPad, I thought about sending structs over the nRFs. Will I be able to do that? I mean, send struct and receive it on the other end. Should I use print method or some other one?

Share this post


Link to post
Share on other sites

Small suggestion to Spirilis :

Why don't you encorporate all the stellaris examples :(Like the rx example roches posted) in the library , so that noobs like me won't have a tough time ? :D

Share this post


Link to post
Share on other sites

Dear spirilis, 

 

Firstly, great work on writing the library / driver for the nRF24L01+ radio... 

 

I've been exploring the Nordic nRF24L01 transceiver for a while and manage to get the following platform working together and transmitting / receiving data to/from each other..

 

Arduino UNO

Atmel attiny84 / 85

Raspberry Pi

Electric Imp 

 

The repos and documentations are at my github or blog below :-

https://github.com/stanleyseow

 

http://arduino-for-beginners.blogspot.com/

 

 

I'm primary using a fork of RF24 from maniacbug and MIRF for the Atmel attinys and ported it to the Electric Imp...

 

Recently, Element14 sent me a free Stellaris Launchpad and of course the first project I wanted to do is to use Energia to get it working with the nRF24L01 radios...

 

I managed to get the Enrf24_TXdemo working/transmitting ( i assumed .. ) from yr repo at https://github.com/spirilis/Enrf24

 

Enrf24 radio transceiver status: Actively Transmitting
Sending packet: ON
Enrf24 radio transceiver status: Actively Transmitting
Sending packet: OFF
Enrf24 radio transceiver status: Actively Transmitting
Sending packet: ON
 
But on the Arduino UNO with an LCD to display to display what was received from the Stellaris...
 
As different libraries / drivers have different default settings, I would like to know what are the defaults so that I can make your library work with the other platforms...
 
e.g. I found out the Mirf addressing is swapped when used with the RF24 libraries and uses 1 Byte of CRC error checking..
 
I'm looking at your header files..
May I know the default of your library for the Enrf24 ?
 
I set the following to match the Arduino UNO settings, is this correct way of setting it ?
  radio.setChannel(88);
  radio.setSpeed(1000000);
  radio.setCRC(1);
 
  radio.begin(); 
 
 
Is the dynamic payload written/enabled ?
 
Where are the setting to set the payload size ?
 
The RF24 or Mirf does not use the IRQ pins, does it matter ??
 
Thanks ...
 
Stanley

Share this post


Link to post
Share on other sites

The params should be set after radio.begin() fyi, and radio.begin() can take params for bitrate. Dynamic payload is always enabled and as such, payload size is not settable. You can load a specific amount of data using the .write() and .print*() methods and use .flush() to force a transmit of current buffer contents.

 

Sent from my Galaxy Note II with Tapatalk 4

 

 

Share this post


Link to post
Share on other sites

Dear Spirilis,

 

Thanks for the quick replies...

After a few tweaks, I manage to get the StellarPad working with my Arduino UNO !!!

 

Thank you :-)

 

 

 

Here are the setting to get it working with Arduino RF24 libraries :-

 

// This address must matched any of the receiving address/pipes on the UNO

const uint8_t txaddr[] = { 0xDE, 0xDE, 0xDE, 0xDE, 0xE3 };
 
// Match UNO bitrate to 1Mbps
  radio.begin(1000000);  // Defaults 1Mbps
  
// Channel number must match
  radio.setChannel(88);
 
// The CRC was set to 16bit, so set to 16 bit, 1st number turn on/off CRC, 2nd number turn on/off 8 or 16bit
  radio.setCRC(1,1);
 
 
Here are my Serial Monitor on the UNO side :-
 
Got payload: ON len:2 
Got payload: OFF len:3 
Got payload: ON len:2 
Got payload: OFF len:3 
Got payload: ON len:2 
 
 
Anyone else that needed help to get the enrf24 libs working with Uno/attiny/Raspberry Pi can contact me or post here... 
 
 
Stanley

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...