nRF24L01+ Setup

nRF24L01+ Module for .NETMF 4.3

The nRF24L01+ module is a 2.4GHz wireless communications device. I’ve released an installer for the module for .NETMF 4.3 which is very much based on previous work (module is here). This post will cover wiring to a FEZ Raptor and the usage of the code. The example uses the following modules:

  • 2x nRF24L01+ modules from Addicore
  • FEZ Raptor
  • Extender Module
  • Breadboard Module X1

The setup looks like this:

nRF24L01+ Setup

 

 

 

 

The trickiest part is wiring the boards together. The Raptor board has three S sockets. I used the first two (socket 1 and socket 2) for this one. You’ll need some sort of extender or breadboard to expand the pins.

The S sockets have the following pin assignments:

Spins

While the nRF24L01+ has the following pins.

 

nRF24L01PlusPins

 

 

 

 

You need to use the following mapping:

Raptor => nRF24L01+

  • +3.3 to VDD
  • GND to VSS
  • MOSI to MOSI
  • MISO to MISO
  • SCK to SCK
  • CS to CSN
  • IRQ to Pin4
  • CE to Pin3

The first two pins are power supply. The next four are for SPI communication. I won’t cover SPI here as it’s covered extensively elsewhere. The IRQ and CE pins are used as an interrupt and digital I/O port (to enable/disable the module).

Once you have the wiring setup, you’ll need to add some code. Because it’s SPI, there’s a bit more setup to do:

Step 1 (Define a sockets)

Step 2 (Initalize Modules)

If you use the FEZ Raptor board and Socket numbers 1 & 3, this will just work. Otherwise, you’ll need to look up which pins you are using! Check the G400 design pdf.

Step 3 (Setup the event handlers and enable the modules)

In my example, I’m only outputting the sent status and the received data.

You can find the full source code at my GitHub project here: nRF24L01PlusExample.

Share this Post