groundFungus:
It is useful to see the output from the sender and receiver at the same time. To do that, open 2 different instances of the IDE (do not use File, New to open a new window) and select each Arduino's comm port in a separate instance of serial monitor. Now you can see the transmit and receive messages at the same time.
What does the receiver show?
How close together are the radio modules? It sometimes helps if you move them apart some.
I have 2 radios hooked to 2 Unos and running the same code, as I write this, successfully.
How are the radios powered (from the Nano 3.3V)? Do you have a 10uF to 100uF cap across the radio module power pins?
groundFungus:
It is useful to see the output from the sender and receiver at the same time. To do that, open 2 different instances of the IDE (do not use File, New to open a new window) and select each Arduino's comm port in a separate instance of serial monitor. Now you can see the transmit and receive messages at the same time.
What does the receiver show?
How close together are the radio modules? It sometimes helps if you move them apart some.
I have 2 radios hooked to 2 Unos and running the same code, as I write this, successfully.
How are the radios powered (from the Nano 3.3V)? Do you have a 10uF to 100uF cap across the radio module power pins?
Winchesters:
I have there a simple TX and RX code to control a servo with a pot.
Tx:
#include <SPI.h> //the communication interface with the modem
#include "RF24.h" //the library which helps us to control the radio modem
int msg[1];
RF24 radio(5,10); //5 and 10 are a digital pin numbers to which signals CE and CSN are connected.
const uint64_t pipe = 0xE8E8F0F0E1LL; //the address of the modem, that will receive data from Arduino.
void setup(void){
radio.begin(); //it activates the modem.
radio.openWritingPipe(pipe); //sets the address of the receiver to which the program will send data.
}
void loop(void){
msg[0] = map (analogRead(0), 0, 1023, 0, 179);
radio.write(msg, 1);
}
Rx:
#include <Servo.h> //the library which helps us to control the servo motor
#include <SPI.h> //the communication interface with the modem
#include "RF24.h" //the library which helps us to control the radio modem
Servo myServo; //define the servo name
RF24 radio(5,10); /This object represents a modem connected to the Arduino.
Arguments 5 and 10 are a digital pin numbers to which signals
CE and CSN are connected./
const uint64_t pipe = 0xE8E8F0F0E1LL; //the address of the modem,that will receive data from the Arduino.
int msg[1];
void setup(){
myServo.attach(3); //3 is a digital pin to which servo signal connected.
radio.begin(); //it activates the modem.
radio.openReadingPipe(1, pipe); //determines the address of our modem which receive data.
radio.startListening(); //enable receiving data via modem
}
void loop(){
if(radio.available()){ //checks whether any data have arrived at the address of the modem
bool done = false; //returns a “true” value if we received some data, or “false” if no data.
while (!done) {
done = radio.read(msg, 1);
myServo.write(msg[0]);
}
}
}
There is the schematic:
https://ibb.co/k6Ckzrh
It's working great for me
Ground fungus i think the problem was that they were too close together and i have a breakout board so i didnt use a capacitor, ive used Winchester's code and modified it as it didnt work and the code didnt make sense, here is the code that i edited