NRF24l01-Arduino Problem

Hello I want to make serial communication between 2 nrf24 modules. But I cannot understand why the communication is not working. My codes and wiring is here:

sender code:

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

//NRF24L01 
RF24 radio(9, 10);  // CE, CSN

//haberleşme kanalı (herhangi bir "string" olabilir)
const byte address[8] = "robolink";

void setup()
{
  radio.begin();
  
  //haberleşme adresini tanımla 
  radio.openWritingPipe(address);
  
  //verici olarak ayarla
  radio.stopListening();
}

void loop()
{
  //sürekli mesaj gönder
  
  const char text[] = "Robolink Akademi"; //mesaj en fazla 32 karakter olabilir
  radio.write(&text, sizeof(text)); 
  
  delay(1000); //1 saniye bekle
}

receiver code:

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

//NRF24L01
RF24 radio(9, 10);  // CE, CSN

//verici ile alıcının kanal isimleri aynı olmalıdır
const byte address[8] = "robolink";

void setup()
{
  while (!Serial);
    Serial.begin(9600);
  
  radio.begin();
  
  //iletişim adresi tanımla
  radio.openReadingPipe(0, address);
  
  //modülü alıcı olarak ayarla
  radio.startListening();
}

void loop()
{
  //eğer data geldiyse okumaya başla
  if (radio.available())
  {
    char text[32] = {0}; //en fazla 32 karakter bir veri alabileceğinden dolayı, 32 karakterlik 0 lar kümesi oluşturduk. 
    //Gelen tüm karakterleri buraya sırayla geçirmiş olacağız 
    
    radio.read(&text, sizeof(text));
    
    Serial.println(text); //Seri ekrana alınan veriyi yazdır
  }
}

I followed this process from https://www.youtube.com/watch?v=x3GQ4sfnFq8&ab_channel=Electroni

Try the advice and examples from here
Simple nRF24L01+ 2.4GHz transceiver demo

They are known to work

thank you ı tried and it has worked successfully. ı use nrf24 with wireless module. I dont use the wireless module and control the wiring and its worked

It appears you have a power supply problem. Use an external 3V3 power source most of the Arduinos do not have enough to drive that module correctly. Some add a capacitor or a few other things and sometimes it may work but none works better then a proper power supply. I have come across this problem many times and generally a proper power supply solves the problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.