Here the code uploaded on my nodemcu:
//Include Libraries
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
//create an RF24 object
RF24 radio(D4, D8); // CE, CSN
//address through which two modules communicate.
const byte address[6] = "00001";
void setup()
{
Serial.begin(115200);
delay(2000);
radio.begin();
//set the address
radio.openWritingPipe(address);
//Set module as transmitter
radio.stopListening();
Serial.println("inizio ad trasmettere");
Serial.println(radio.isChipConnected());
}
void loop()
{
Serial.println("qui");
const char text[] = "Hello World";
bool ret = radio.write(&text, sizeof(text));
Serial.print("Write ret: ");
Serial.println(ret);
delay(1000);
}
and here the code on the arduino side
//Include Libraries
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
//create an RF24 object
RF24 radio(5, 6); // CE, CSN
//address through which two modules communicate.
const byte address[6] = "00001";
void setup()
{
Serial.begin(115200);
delay(2000);
radio.begin();
//set the address
radio.openReadingPipe(0, address);
//Set module as receiver
radio.startListening();
Serial.println("inizio ad ascoltare");
Serial.println(radio.isChipConnected());
}
void loop()
{
//Read the data if available in buffer
if (radio.available())
{
char text[32] = {0};
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
My nodemcu wiring scheme https://i.stack.imgur.com/C3zWN.png
and my arduino nano wiring scheme https://i.stack.imgur.com/DoeRH.png
My nrf24l01 module is this one (not the module in the fritzing scheme) https://www.amazon.it/gp/product/B06WD17WLS.
Can anyone see something that I don't see? I'm really frustrated