Problem with configuring nRF24L01

I connected nRF24L01 to WEMOS D1. Here is the code I wrote

#include <SPI.h>
#include <RF24.h>

RF24 radio(2, 1);  // CE pin = D9, CSN pin = D10
const byte address[6] = "00001";    // Pipe address



void setup() {
  Serial.begin(9600);
  if (!radio.begin()) {
    Serial.println("Radio hardware not responding!");
    while (1);
  }
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_LOW);  // More stable on breadboards
  radio.stopListening();          // Set as transmitter
}

void loop() {
  const char text[] = "hello";
  bool ok = radio.write(&text, sizeof(text));
  Serial.println(ok ? "Sent: hello" : "Send failed");
  Serial.println("ok");
  delay(1000);
}

The connectivity is as follows.

GND to GND VCC to 3V3

CE to D2

CS to D1

SCK D5

MOSI D7

MISO not connected

And yet when I start the sketch I get following errors

ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3424, room 16 
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8 
tail 0
chksum 0x2b
csum 0x2b
v00042ca0
~ld

The pins are not labled but I have the module like this and I am following the attached pinout

Google found this : “An nRF24L01 pipe address is a unique, 5-byte address that defines a communication route between two nRF24L01 modules on a shared RF channel. While a transmitter uses one address to open a writing pipe, a receiver can have up to six reading pipes, each with a different address to simultaneously listen to multiple sources. The addresses for pipes 0 and 1 can be fully defined, but for pipes 2 through 5, only the last byte can be unique, as the first four bytes must match the address of pipe 1.”.

You define 6 bytes, but only fill 5 of them.

So haw does it affect my problem. Can you suggest what sould I change?

I don’t know, but change the array to 5 bytes and see. Are you using proper addresses for the pipe?

Try replacing that line with:

radio.openWritingPipe(0xF0F0F0F0D2LL);



On both TX and RX sketches.

Why would this make a difference?

? ? ?

Do you mean IRQ not connected ?

Issue fixed. So two things:

  • MISO must be connected for both transmitter and receiver.
  • The command to declare the module should look like RF24 radio(D2, D1); and not RF24 radio(2, 1);