Nrf display blank lines

hello i was able to use my nrf modules in the past with arduino mega and nano and i got a distance about 1km but now i am trying with mega and pro mini conected via uno to the pc and reading the message serial from it. i get only blank lines, this is the code

tx

 #include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(40,53); // CE, CSN
const uint64_t pipe = 0xE6E6E6E6E6E6;
const char NrfDataA[10] = "ONA";
const char NrfDataB[10] = "ONB";
const char NrfDataC[10] = "ONC";
const char NrfDataD[10] = "OND";

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setChannel(108);
  radio.openWritingPipe(pipe);
  radio.setPALevel(RF24_PA_MAX);
  radio.setDataRate(RF24_250KBPS);
  radio.setAutoAck(false);
  radio.setRetries(3,5); // delay, count
  radio.stopListening();
}

void loop() {

  radio.write(&NrfDataA, sizeof(NrfDataA));
  
  digitalWrite(13,HIGH);
  delay(100);
  digitalWrite(13,LOW);
  delay(100);
  
}

rx


#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <SoftwareSerial.h>

RF24 radio(9, 10); // CE, CSN, SCK, MOSI, MISO, IRQ
SoftwareSerial mySerial(0, 1); // RX bluetooth, TX bluetooth
const uint64_t pipe = 0xE6E6E6E6E6E6;
String BluetoothData;
char NrfData[10];
String rfData;

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setChannel(108);
  radio.openReadingPipe(1, pipe);
  radio.setPALevel(RF24_PA_MAX);
  radio.setDataRate(RF24_250KBPS);
  radio.setAutoAck(false);
  radio.setRetries(3,5); // delay, count
  radio.startListening();
  BluetoothData = "OFF" ;
  rfData = "OFF" ;
}

void loop() {
  
  if (radio.available()) {
    
    radio.read(&NrfData, sizeof(NrfData));
    rfData = String(NrfData);
    
    Serial.println(rfData);
    
  }


  if (mySerial.available()) {
    
    BluetoothData = mySerial.readString();
    
    mySerial.println("OK");
    Serial.println(BluetoothData);
    
  }



  
}

i am also tried with a hc05 module that works but i disconected it at testing of the nrf, i have 100uf caps and power from pc or phone charger

You need to check the last link, the UNO to Pc. Does it work?
Then check the communication pro mini to UNO.

i conected rx-rx
tx-tx
gnd and 5v
reset- pin in the corner of pro mini

void setup() {
  Serial.begin(9600);

}

void loop() {
  Serial.println("working");
delay(100);
}

the uno has the chip removed

kind of

Tells me nothing. Sorry.

what am i supposed to tell you ? i don't know why it doesn't work, i think the problem is the receiving unit but also may be the cheap wires

Divide Your project into smaller parts and test those smaller parts, communicating parts and make sure they work. Don't run the entire system, project all the time.

Maybe your program is fine. The problem could be the contrast PIN LCD.

Did you try to use the contrast pin??? You should try to put it on your LCD circuit. If you use to use it maybe you should check the voltage.

Bellow you can see the circuit with 16 bits LCD and a PIC

image

that is what i am doing, i first tested the bluetooth module and it worked then i removed it and tested the nrf but i kept the first code ,also i tested with only the nrf code in a separate file but no success. i changed the receving module, the one without antena with 3 different ones that i had and only one give me some blank lines, the other not even that. the tx i only have one with antena as i want a one way comunication as a remote controller but i understood that they send a confirmation note if the message arrived ? if so one of them would send far and one won't because it doesn't have antena

Test and verify each new step in the project. You are up to a rather complex system and I don't spend my life analyzing it. I give You general advice how to approach an error in a large system.

even the simple test code doesn't work with nrf

Step back to square number one and find out what's wrong.
I am out.

Which power source did you use to make your system?? Maybe you need a better power source. I had have this problem when I was working with LCD in bigger systems. If your system needed a lot of power you could use a better power source because when you put ON your circuit maybe you have a problem with. You should check your IN voltage when your circuit is put ON and when it's working.

i used a phone charger for the tx and pc supply for the rx unit, i have 3.4v at the nrf pins , right now i see that if the serial monitor is on ,the led on the uno blinks as it sends the text but when it is closed the led stays always on



Screenshot_4
it just raise as it is receving something at the right delay that the tx transmit but it shows nothing but blank lines, i tried with different formats of the char to send

i just realized that it receives even without the tx powered up

i changed the rx unit with another one and it worked but only with a cap on the nrf

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.