Jump to content
43oh

[Energia Library] Nordic nRF24L01+ library


Recommended Posts

  • Replies 352
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi folks... So I'm a little new to Energia, but since I wrote a library for the nRF24L01+ digital transceivers for native C-based apps I figured it'd be a great idea to port this to Energia.   I'm r

Ok, so I ported the Enrf library over so that it works with both MSP430 and Stellaris.  Seems to work great.  I am watching the tx rx demo between msp430g2553 (on the RX side), and the StellarPad doin

Okie doke - https://github.com/spirilis/Enrf24   The examples are the same as the ones I posted... I'll write up the API in a wiki page soon.  Alternately, I put documentation in the Enrf24.h file f

Posted Images

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

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.

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?

Link to post
Share on other sites
  • 1 month later...

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
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

 

 

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
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...