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

Yes, the blinking works fine. Most recently, I removed the blinking and loaded the exact code from github.

The brown and orange are in their correct locations. The picture can be misleading.

Everything works exactly the same on the launchpad. Before, I was getting 1/2VCC on some of the pins such as CE, but I think that's because the LED was still connected. Now, I disconnected it.

Adding a 0.1uF cap from VCC to GND does nothing. I make it common practice to put a cap from RST to ground though.

Link to post
Share on other sites

I've always had horrible luck with software. That's why I'm a hardware guy.

Probably my only bet now is to buy two new complete launchpads and start from scratch.

Still, I have to stress that the MOSI pin is behaving in exactly the same way the CSN pin should behave. Somehow, I think the pins got switched around in the code.

Link to post
Share on other sites

I just got two new launchpads and loaded them with the transceiver codes. They work great! However, I did take note of some interesting observations:

1) The transmitter pins did not change at all. CE remained low, CSN remained high, and MOSI was pulsing just before transmitting each bit. So, it turns out the transmitter was working fine after all.

2) I took the receiver off the launchpad and used it as a standalone with the same configuration as before. No luck.

3) Something I failed to mention before was that the receiver on standalone would sometimes turn the LED on with the transmitter, but this happened rarely. It's happening again, only more frequently. So it is trying to work, but I must be missing something in the hardware configuration.

Looking at the launchpad schematic, it looks like all I need is the resistor and cap going to the RST pin, which I already have. Resistor is 47K as indicated, but I used a 0.1uF instead of a 1nF as specified. I'm going to give that a try next.

So to summarize, the problem is that the receiver is not working off the launchpad. Other than that, all hardware is functioning properly.

Here is a link to the launchpad schematic:

http://www.ti.com/tool/msp-exp430g2
Link to post
Share on other sites

Hi Spirillis, your library for nrf module has been very useful for me in my project. I need to extend it to multiceiver, so I made a few changes

 In Enrf24.cpp 

1)  _writeReg(RF24_EN_RXADDR, 0x03)  to      _writeReg(RF24_EN_RXADDR, 0x07)

 

2) void Enrf24::setRXaddress(const void *rxaddr1)

{ _writeRegMultiLSB(RF24_RX_ADDR_P1, (uint8_t*)rxaddr1, rf_addr_width);} 

to

void Enrf24::setRXaddress(const void *rxaddr1,const void*rxaddr2)
{ _writeRegMultiLSB(RF24_RX_ADDR_P1, (uint8_t*)rxaddr1, rf_addr_width);

_writeRegMultiLSB(RF24_RX_ADDR_P2, (uint8_t*)rxaddr2, rf_addr_width)

}

 

and I changed definitions correspondingly in Enrf24.h

To test this, in the transmitter side, I am sending data to rxaddr2, but I am not getting any output from the receiver side. Is there anything I am missing here?

Link to post
Share on other sites
  • 9 months later...

The libraries from Energia did not work with me at all. I had to go to the original post where you mentioned " Mad a lot of progress........" and then you posted 2 code for TX and RX. Those worked with me. All I needed to do was to move the #include <SPI".h> to first line. It worked fine after that! 

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