This application demonstrates read and write capability of the NRF24L01 radio transmiter driver. There are 3 modes: Alice, Bob and Eve.
- Alice first sends a message, then listens for Bob’s answer
- Bob first listens for Alice’s message, then answer to Alice
- Eve just listens for Alice and Bob’s messages, without interfering (not mandatory to run our example)
This example app can be run on the following boards:
- STM32 Nucleo F756ZX (nucleo_f756zg)
- Nordic NRF52DK (nrf52dk_nrf52832)
- Espressif ESP32 DevKitC WROOM (esp32_devkitc_wroom)
For each board, an example overlay layer is provided.
Those modes can be selected with the project conf file.
For instance, let’s have a Nrf52dk in the role of Alice, a Nucleo in the role of Bob and an ESP32 in the role of Eve.
BOARD="nrf52dk_nrf52832";west build -b $BOARD -p always app -- -DOVERLAY_CONFIG=alice.conf
BOARD="esp32_devkitc_wroom";west build -b $BOARD -p always app -- -DOVERLAY_CONFIG=eve.conf
BOARD="nucleo_f756zg";west build -b $BOARD -p always app -- -DOVERLAY_CONFIG=bob.conf
Name | NRF24 pin | Nucleo pin | Nucleo logical GPIO | NRF52DK pin | NRF52 logical GPIO | ESP32WROOM pin | ESP32 logical GPIO |
---|---|---|---|---|---|---|---|
GND | 1 | GND | GND | GND | |||
VCC | 2 | 3V3 | VDD | 3V3 | |||
CE | 3 | D9 | PD15 | P0.19 | D8 | 16 | 16 |
CSN / NSS | 4 | D24 | PA4 | P0.22 | D10 | D3 | 10 |
SCK | 5 | D23 | PB3 | P0.25 | D13 | 14 | 14 |
MOSI | 6 | D22 | PB5 | P0.23 | D11 | 15 | 15 |
MISO | 7 | D25 | PB4 | P0.24 | D12 | 2 | 2 |
IRQ | 8 | D10 | PD14 | P0.20 | D9 | 17 | 17 |