Communication between Pico and Nano using NRF24L01

Transmitter Code in Nano:

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


RF24 radio(7, 8); // CE, CSN pins
const byte address[6] = "00001"; // Address of the receiver
const uint64_t pipes = 0xF0F0F0F0E1LL;


void setup()
 {
  Serial.begin(9600); 
  radio.begin();
  radio.openWritingPipe(pipes);
  radio.setChannel(100);
  radio.stopListening();
}


void loop() {
  int dataToSend[13] = {0,12,11,0,0,121,50,11,170,111,0,50,1};
  radio.write(&dataToSend, sizeof(dataToSend));
  delay(1000);
}

Receiver Code in Pico:

import utime
from machine import Pin, SPI
from nrf24l01 import NRF24L01

#addresses
pipes = b'\xE1\xF0\xF0\xF0\xF0'

#turning on picos built-in LED to indicate that power is on
led = Pin(25, Pin.OUT)
led.value(1)

print('Pico RX Starting')

#setting up nrf24l01 object
spi = SPI(0, sck=Pin(6), mosi=Pin(7), miso=Pin(4))
csn = Pin(14, mode=Pin.OUT, value=1)
ce = Pin(17, mode=Pin.OUT, value=0)
nrf = NRF24L01(spi, csn, ce, channel=100, payload_size=32)

#opening listening pipe
nrf.open_rx_pipe(0, pipes)
nrf.start_listening()

print('RX Ready. Waiting for packets...')

while True:
    utime.sleep(1)
    
    #checking for a message on the nrf24l01
    if nrf.any():
        print('Received something!:')
        package = nrf.recv()
        msg = package.decode()[0:9]
        print(msg)

The receiver works with another nano but can't communicate with pico..
please Help me!

Receiver Code in another Nano:

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


//create an RF24 object
RF24 radio(7, 8);  // CE, CSN

//address through which two modules communicate.
const byte address[6] = "00001";
const uint64_t pipes = 0xF0F0F0F0E1LL;

int data[13];

void setup() {
  Serial.begin(9600);
  radio.begin();
  //set the address
  radio.openReadingPipe(0, pipes);
  radio.setChannel(100);
  //Set module as receiver
  radio.startListening();
}


void loop() {
  if (radio.available())
{
   
    radio.read(&data, sizeof(data));
    for(int i = 0; i < 13; ++i){
      Serial.print(data[i]);
      Serial.print(",");
    }
    Serial.println("Done");

    }
    }

I assume a Raspberry Pi Pico RP2040?
how did you connect the nRF24L01to the Pico?

Post an annotated schematic showing exactly how you have wired it. Be sure to include all connections, power, ground, power sources etc. Post links to the hardware items. How far apart are the units?

Using a 10uF capacitor between the VCC and GND of Nrf24l01 module

Circuit diagram is given below.
modules are placed around 30 cm apart.
power source is 7.4v from 2 18650 battery pack with an adapter of 3.3v.

using a RPi pico RP2040 I connected it to a NRF24L10 using

// RP2040 connections
// RP2040 SPIO_SCK pin GP18 goes to NRF24L10_pin SCK
// RP2040 SPIO_RX pin GP16 goes to NRF24L10_pin MISO
// RP2040 SPIO_TX pin GP19 goes to NRF24L10_pin MOSI
// RP2040 pin SPIO_CSn GP17 to NRF24L10 CSN 
// RP2040 pin GP20 to NRF24L10 CE 
// RP2040 GND and 3.3V to NRF24L10  GND and VCC

communicates OK with NRF24L10 connected to a ESP32

Can you give the Code for pico please?

copied your nano program from post 2 updated it for RP2040

//  RPi Pico RP2040 > NRF24L01 receiver test

// RP2040 connections
// RP2040 SPIO_SCK pin GP18 goes to NRF24L10_pin SCK
// RP2040 SPIO_RX pin GP16 goes to NRF24L10_pin MISO
// RP2040 SPIO_TX pin GP19 goes to NRF24L10_pin MOSI
// RP2040 pin SPIO_CSn GP17 to NRF24L10 CSN 
// RP2040 pin GP20 to NRF24L10 CE 
// RP2040 GND and 3.3V to NRF24L10  GND and VCC

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


//create an RF24 object
RF24 radio(20, 17);  // CE, CSN

//address through which two modules communicate.
const byte address[6] = "00001";
const uint64_t pipes = 0xF0F0F0F0E1LL;

int data[13];

void setup() {
  Serial.begin(115200);
  delay(3000);
  Serial.println("\n\nRPi Pico RP2040 > NRF24L01 Receive structure");
  radio.begin();
  if (radio.isChipConnected())
    Serial.println("\n\nReceiver NF24 connected to SPI");
  else {
    Serial.println("\n\nNF24 is NOT connected to SPI");
    while (1)
      ;
  }
  //set the address
  radio.openReadingPipe(0, pipes);
  radio.setChannel(100);
  //Set module as receiver
  radio.startListening();
}


void loop() {
  if (radio.available()) {

    radio.read(&data, sizeof(data));
    for (int i = 0; i < 13; ++i) {
      Serial.print(data[i]);
      Serial.print(",");
    }
    Serial.println("Done");
  }
}

serial monitor displays

RPi Pico RP2040 > NRF24L01 Receiver
Receiver NF24 connected to SPI
0,12,11,0,0,121,50,11,0,0,0,0,0,Done
0,12,11,0,0,121,50,11,0,0,0,0,0,Done
0,12,11,0,0,121,50,11,0,0,0,0,0,Done
0,12,11,0,0,121,50,11,0,0,0,0,0,Done
0,12,11,0,0,121,50,11,0,0,0,0,0,Done

are you using c for pico without micropython?

I use C/C++ when programming the RPi pico
same code as Nano, ESP32 etc
in Tools>Board select 'Raspberry Pi Pico' and change the pin settings

RF24 radio(20, 17);  // CE, CSN

after uploading serial monitor shows one time then after clicking again to serial monitor it shows nothing with Arduino IDE with Pico.
why is that?
Basic code in serial monitor shows how many time I open serial monitor.
but the code u given shows serial data only one time

the code in post 9 is the receiver - is the transmitter working?

upload the serial monitor output (as text not a screen dump)
in particular do you get the message

Receiver NF24 connected to SPI

how have you connected the RP2040 and NRF24L01?

Try to get them at least a meter apart.

Connected exactly like this. but Serial Monitor shows nothing after uploading the code.
I have tried other code and blink led and that works

its working but receiving garbage value rather than the Value I want
shows:
786432,11,7929856,720946,7274666,3276800,1,0,0,0,0,0,0,Done

you also received different value that the transmitter value

possibly due to int being two bytes on a Nano and four bytes on a RP2040
try on both transmitter and receiver using int16_t, e.g.

  int16_t dataToSend[13] = {0,12,11,0,0,121,50,11,170,111,0,50,1};

not sure why this is on both ESP32 and RP2040 ints are four bytes
edit: probably due to NRF24L01buffer size being 32bytes therefore only eight 4byte ints are transmitted???

however, when I change transmitter and receiver to int16_t the receiver displays

RPi Pico RP2040 > NRF24L01 Receive 
Receiver NF24 connected to SPI
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done
0,12,11,0,0,121,50,11,170,111,0,50,1,Done

Thanks buddy
its working fine