I'm trying to set up a connection between NRF24L01+ modules, with a Nano transmitting and a Leonardo on the receiving side. I have been following the Simple nRF24L01+ 2.4GHz transceiver demo, I've wired everything up according to the first post, and I'm trying the code on reply #30 as suggested. The problem I'm having is that there is absolutely no serial monitor output given.
I have checked all my connections 4 times, and individually checked every single wire connection to make sure it's not a hardware problem. I even swapped out the module for another one that I know is working and there still isn't anything printed in the serial monitor. I've also tried to use a capacitor to make sure the voltage is steady. I also tried to move the MOSI, SCK and MISO pins to the ones on the ICSP header instead but still no serial monitor output.
However when I tried this exact arrangement on a Uno, it worked exactly as shown in the guide and I was able to get a serial monitor output.
Is there some extra code I need to put in that I don't know about for the Leonardo? I also tried this on my Pro Micro, after looking up the SPI pins and making sure everything is wired up properly - still absolutely no serial monitor output.
Note: I don't have any error messages to provide because the serial monitor is literally blank and absolutely nothing is printing, including the Serial.println() lines.
The Leonardo has a habit of changing its com port whenever it reboots , so you need to check for this on the ports menu , that could be why you have no print .
At the start of your sketch it’s worth a short print to check that side is ok
( I print “go!”) , helps to spot problems .
using a NRF24L01 with a Leonardo I used the following connections
// Leonardo > NRF24L01 transmitter test using a text string
// Leonardo connections
// Leonardo ICSP SCK pin 15 to NRF24L10_pin SCK
// Leonardo ICSP MISO pin 14 to NRF24L10_pin MISO
// Leonardo ICSP MOSI pin 16 to NRF24L10_pin MOSI
// Leonardo pin 10 to NRF24L10 CSN
// Leonardo pin 9 to NRF24L10 CE
// Leonardo GND and 3.3V to NRF24L10 GND and VCC
#include <SPI.h>
#include "RF24.h"
#define CE_PIN 9
#define CSN_PIN 10
bool radioNumber = 0;
RF24 radio(CE_PIN, CSN_PIN);
byte addresses[][6] = { "1Node", "2Node" };
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println("\n\nLeonardo > NRF24L01 transmit text");
radio.begin();
if (radio.isChipConnected())
Serial.println("Transmitter NF24 connected to SPI");
else Serial.println("NF24 is NOT connected to SPI");
the ICSP pins are
when run serial monitor displays
Leonardo > NRF24L01 transmit text
Transmitter NF24 connected to SPI
transmit text 0
transmit text 1
transmit text 2
transmit text 3
transmit text 4
transmit text 5
Sorry for the delay, I was quite busy this week. Here is the photo of all the pin connections - it's connected to 3.3V, CE and CSN pins are 9 and 10 respectively, and I connected the MISO, SCK and MOSI pins to their respective pins on the ICSP header.
I'm powering the board using a USB cable, not a battery pack. This exact configuration of wiring and code worked on my UNO board, when it was connected to the same port on my PC.
I'm trying the code from post #30 of Robin2's RF24 demo but I'm still not getting anything from the serial monitor.