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
| Qty | Part | What it does |
|---|---|---|
| 1 | Raspberry Pi Pico | the microcontroller board |
| 1 | Radio nRF24L01 | 2.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
| # | From | To |
|---|---|---|
| 1 | Raspberry Pi Pico 3V3 | Radio nRF24L01 VCC |
| 2 | Raspberry Pi Pico GND | Radio nRF24L01 GND |
| 3 | Raspberry Pi Pico GP2 | Radio nRF24L01 SCK |
| 4 | Raspberry Pi Pico GP3 | Radio nRF24L01 MOSI |
| 5 | Raspberry Pi Pico GP4 | Radio nRF24L01 MISO |
| 6 | Raspberry Pi Pico GP5 | Radio nRF24L01 CSN |
| 7 | Raspberry Pi Pico GP6 | Radio nRF24L01 CE |
Step by step
- Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Raspberry Pi Pico. No install or account is needed.
- Add the parts. Add a radio nRF24L01 from the parts palette.
- Wire 1. Connect Raspberry Pi Pico 3V3 to Radio nRF24L01 VCC.
- Wire 2. Connect Raspberry Pi Pico GND to Radio nRF24L01 GND.
- Wire 3. Connect Raspberry Pi Pico GP2 to Radio nRF24L01 SCK.
- Wire 4. Connect Raspberry Pi Pico GP3 to Radio nRF24L01 MOSI.
- Wire 5. Connect Raspberry Pi Pico GP4 to Radio nRF24L01 MISO.
- Wire 6. Connect Raspberry Pi Pico GP5 to Radio nRF24L01 CSN.
- Wire 7. Connect Raspberry Pi Pico GP6 to Radio nRF24L01 CE.
- Paste the MicroPython code. Paste the MicroPython code below into the code editor.
- 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
- Raspberry Pi Pico LED Blink: Wiring, Code and Simulator
- Raspberry Pi Pico Push Button: Wiring, Code and Simulator
- Raspberry Pi Pico ADC + PWM LED Dimmer: Wiring, Code and Simulator
- Raspberry Pi Pico NeoPixel Ring: Wiring, Code and Simulator
- Raspberry Pi Pico DHT22 Sensor: Wiring, Code and Simulator
- Raspberry Pi Pico I2C LCD: Wiring, Code and Simulator