4-Wheel Drive Car Project with NRF24L01 Communication, HC-SR04 Obstacle Detection, and L298N Motor Driver Issues

I mean i wasn't sure if i had to use 3.3V on the VCC or 5V. I had some doubts.

You are wrong. The others did not ask pointless questions, and generally do not give pointless answers. If you do not understand an answer, try to figure it out, and if you can not, either thank them or ask for clarification. You, telling any of them they are no help, is bad.

Thank them (not me) and continue progressing toward coding electronics independence.

That seems to be the theme of a lot of threads on the forum. Replace hope with measurements, reading documentation, and debugging the circuits and code.

I read everything did everything and i tried debugging everyhing but it connects can't send

Show us the code you used to just test the NRF devices and shows it connects but does not send.

The transmitter's

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[6] = "robotistan100";
void setup() {
  radio.begin();
  radio.openWritingPipe(address);
  radio.setPALevel(RF24_PA_MIN);
  radio.stopListening();
}
void loop() {
 const char text[] = "Hello World"; // maksimium 32 karakter olabilir
 radio.write(&text, sizeof(text));
  delay(1000);
}

the reciever's

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(9, 10); // CE, CSN
const byte address[10] = "robotistan100";
void setup() {
  Serial.begin(9600);
  if(radio.begin()){
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
  Serial.println("helo");
  }else{
    Serial.println("fail");
    while(1);
  }
}
void loop() {
  if (radio.available()) {
    char text[32] = "";//print only 32 characters
    radio.read(&text, sizeof(text));
    Serial.println(text);
  }
}

I switched the pins accordingly still no bueno

Are you using two separate PCs, or one PC and two windows? When I did tests several years ago I used one laptop with two windows.

i used 2 different PCs and same PCs but as before, no bueno again.

Interest how you think you can get the value into 6 bytes! There is no magic in C code.

I should probably redo the whole thing. i need to solve other stuff...

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