Hello all
I´ve been working in a RC airplain controlled just by arduino, for this I used NRF24L01, but this results to be such a struggle 'cause it has had a lot of failures, bought a low signal antenna and a PNA one, with 2 base modules wich should work perfectly with 5V.
They worked perfectly the first days, but it didn't last ´cause when I tried it like at the 4 or 5 time it didn´t work at all, I reviewed the connections, also the script but nothing seems to be the problem, unfortunately I don´t have any multimeter or something like that to check some failure. Here I left the script if you want to look at it.
This is the reciever code:
#include <nRF24L01.h>
#include <SPI.h>
#include <RF24.h>
#include <RF24_config.h>
RF24 radio (7, 8);
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);
delay(500);
}
else {
const char text[] = "no funciona";
Serial.println(text);
delay(500);
}
}
and this is the transmitter code
#include <nRF24L01.h>
#include <SPI.h>
#include <RF24.h>
#include <RF24_config.h>
RF24 radio(7, 8);
const byte address[6] = "00001";
void setup() {
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN);
radio.stopListening();
}
void loop() {
const char text[] = "funciona!!!";
radio.write(&text, sizeof(text));
delay(500);
}
It allways sends me to "no funciona" (it doesn´t work in spanish) when it shoud send "funcina!!"(it works!! in spanish), of course, it´s the proof code.
Hope you guys can help me with this, i've been trying and trying a long time ago, I'm really bored with this, and sorry for any english error, thank you.