Raspberry Pi Pico nRF24L01 Receiver: Wiring, Code and Simulator

To build this Raspberry Pi Pico nRF24L01 Receiver project you need a Raspberry Pi Pico and a radio nRF24L01. MicroPython’s nrf24l01 driver on the Pico’s hardware SPI hears the Arduino RF24 transmitter: the same radio settings in two languages. Make the 7 connections in the wiring table, upload the MicroPython code, and run the Arduino transmitter in another tab. Connect the logic analyzer to GP2–GP5 to see every SPI byte.

Open this circuit in the free Raspberry Pi Pico simulator

Parts list

QtyPartWhat it does
1Raspberry Pi Picothe microcontroller board
1Radio nRF24L012.4 GHz transceiver on SPI: VCC to 3.3 V (not 5 V), CE and CSN to any pins, SCK/MOSI/MISO to the board’s SPI pins; IRQ optional. Works with the RF24 library and MicroPython’s nrf24l01 driver. It talks to nRF24 radios in your other circuits: open the receiver in a second tab. Channel, data rate, address and payload size must match.

Wiring

#FromTo
1Raspberry Pi Pico 3V3Radio nRF24L01 VCC
2Raspberry Pi Pico GNDRadio nRF24L01 GND
3Raspberry Pi Pico GP2Radio nRF24L01 SCK
4Raspberry Pi Pico GP3Radio nRF24L01 MOSI
5Raspberry Pi Pico GP4Radio nRF24L01 MISO
6Raspberry Pi Pico GP5Radio nRF24L01 CSN
7Raspberry Pi Pico GP6Radio nRF24L01 CE

Step by step

  1. Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Raspberry Pi Pico. No install or account is needed.
  2. Add the parts. Add a radio nRF24L01 from the parts palette.
  3. Wire 1. Connect Raspberry Pi Pico 3V3 to Radio nRF24L01 VCC.
  4. Wire 2. Connect Raspberry Pi Pico GND to Radio nRF24L01 GND.
  5. Wire 3. Connect Raspberry Pi Pico GP2 to Radio nRF24L01 SCK.
  6. Wire 4. Connect Raspberry Pi Pico GP3 to Radio nRF24L01 MOSI.
  7. Wire 5. Connect Raspberry Pi Pico GP4 to Radio nRF24L01 MISO.
  8. Wire 6. Connect Raspberry Pi Pico GP5 to Radio nRF24L01 CSN.
  9. Wire 7. Connect Raspberry Pi Pico GP6 to Radio nRF24L01 CE.
  10. Paste the MicroPython code. Paste the MicroPython code below into the code editor.
  11. Run it. Press Run. Run the Arduino transmitter in another tab. Connect the logic analyzer to GP2–GP5 to see every SPI byte.

MicroPython code

# nRF24L01 receiver on a Raspberry Pi Pico (MicroPython).
# Hears the Arduino "nRF24L01 transmitter" example: open it in a second tab.
# Wiring: VCC 3V3, GND, SCK GP2, MOSI GP3, MISO GP4, CSN GP5, CE GP6.
from machine import Pin, SPI
from nrf24l01 import NRF24L01, POWER_1, SPEED_1M
import utime

spi = SPI(0, sck=Pin(2), mosi=Pin(3), miso=Pin(4))
csn = Pin(5, mode=Pin.OUT, value=1)
ce = Pin(6, mode=Pin.OUT, value=0)
led = Pin(25, Pin.OUT)

# The same settings as the RF24 library's defaults on the Arduino:
# channel 76, 1 Mbit/s, 32-byte payloads, address "00001".
nrf = NRF24L01(spi, csn, ce, channel=76, payload_size=32)
nrf.set_power_speed(POWER_1, SPEED_1M)
nrf.open_tx_pipe(b"00002")
nrf.open_rx_pipe(0, b"00001")
nrf.start_listening()
print("Pico listening on channel 76...")

while True:
    if nrf.any():
        buf = nrf.recv()
        text = buf.split(b"\x00")[0].decode()
        print("Received:", text)
        led.toggle()
    utime.sleep_ms(5)

What to try

Run the Arduino transmitter in another tab. Connect the logic analyzer to GP2–GP5 to see every SPI byte.

Frequently asked questions

How do I wire the nRF24L01 Receiver project on a Raspberry Pi Pico?

Make 7 connections: Raspberry Pi Pico 3V3 to Radio nRF24L01 VCC; Raspberry Pi Pico GND to Radio nRF24L01 GND; Raspberry Pi Pico GP2 to Radio nRF24L01 SCK; Raspberry Pi Pico GP3 to Radio nRF24L01 MOSI; Raspberry Pi Pico GP4 to Radio nRF24L01 MISO; Raspberry Pi Pico GP5 to Radio nRF24L01 CSN; Raspberry Pi Pico GP6 to Radio nRF24L01 CE.

What parts do I need for this Raspberry Pi Pico project?

A Raspberry Pi Pico and a radio nRF24L01.

Can I simulate this Raspberry Pi Pico project online for free?

Yes. The BitForBytes Embedded Lab runs this exact circuit and MicroPython code in your browser for free, with no install and no hardware. The RP2040 is emulated and runs the official firmware.

What does the code do?

MicroPython’s nrf24l01 driver on the Pico’s hardware SPI hears the Arduino RF24 transmitter: the same radio settings in two languages.

More Raspberry Pi Pico projects