I have used arduino nano in the transmitter side with NRF24L01. It works fine. But in the receiver end, I used arduino pro micro with NRF24L01 and it is not receiving signal.
Can anyone help me out how to solve this problem.
It might be a problem with your code. It might be a problem with your wiring. But you haven't provided any information on either of these things so it's impossible to know.
You also failed to state which voltage Pro Micro you’re using. If it was a 5v board and you hooked the NRF24 up to the vcc pin, you fried the radio board which requires a 3.3 volt supply since NRF24 chip i/o pins are 5v tolerant, the supply pin isn’t.
Also, your statement the the transmitter is working is highly dubious since the receiver isn't working. See the logical flaw in your statement?
I have attached the pin diagram of the receiver node below.
Currently I am trying a normal transmitter receiver code for nrf24L01 to check whether the circuit is working or not.
At the transmitter end (nano is used), the transmitter blinking light clearly blinks after transmission (also at serial monitor message is displayed). Whereas at the receiver end, it doesn't show any blinking light.
I am using 5V pro micro but by using a voltage regulator IC I have stepped it down to 3.3 v and that's the VCC for nrf24L01
Here is the code
//Transmitter Code
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_LOW);
radio.stopListening();
}
void loop() {
const char text[] = "How are you!";
radio.write(&text, sizeof(text));
Serial.println("Transmission Done!");
delay(1000);
}
//Receiver end
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "00001";
void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();
}
void loop() {
if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
Serial.println(text);
}
}
Your code appears to be the Mechatronics example code which should function so I’d suspect a hardware issue. Note that the transmit code does not confirm the message was actually received. Robin’s demo code available here is a better code base.
Possible problems:
- Not enough current available from your 3v3 regulator or perhaps missing bypass caps.
- Incorrect wiring, the pro micro SPI pins are different than the Nano pins.
- Bad jumper wires.
If you’re still stuck, post some clear photos of each setup so we can see if there is anything obvious with the interconnects.
It could be that the specific libraries you are using are not compatible with the Pro Micro (and now me too).
Try adding this to the beginning of the code: (and just comment out if using Nano)
#define SOFT_SPI_MISO_PIN 14
#define SOFT_SPI_MOSI_PIN 16
#define SOFT_SPI_SCK_PIN 15
Unfortunately it seems this was an old discussion but I can't leave this unsolved.