Hello! So my nRF24L01 modules suddenly work and suddenly don't. Same code. Just by simply moving it, it stops working and suddenly it does after rewiring/reconnecting/moving and such. What is causing this issue? I have been trying to fix this for a month now.
I attached images of my setup. I tried using the Breakout board for this module and without it (changed VCC to 3.3v without board). I am supplying 5v using an Arduino Uno, tried batteries and no difference. Even changed to smaller RF24. The picture in the left is when i changed which is which Rx and Tx. What i am trying to say is there is no consistency on when it works and when it doesn't. Just but re-plugging them without moving also causes receiver to stop working.
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_MIN);
radio.stopListening();
}
void loop() {
const char text[] = "Hola";
radio.write(&text, sizeof(text));
Serial.println("Transmitted");
delay(1000);
}
Receiver Code:
type or paste code here#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.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);
}
}


