OK Firstly thanks to everyone for your help, I have final got to sending and receiving data reliably between the two modules. I have actually switched to another sketch (my original) only as it seemed more basic and I was able to work through all the functions.
A key changer I think was that I changed the voltage regulator board input from the Arduino 3.3v to 5V and this has allowed me to use all the strengths of RF.
You could remove the print lines as I was only using them to debug the set up.
Here is the Transmitter and Receiver Sketch:
/*
- Arduino Wireless Communication Tutorial
- Example 1 - Transmitter Code
- by Dejan Nedelkovski, www.HowToMechatronics.com
- Library: TMRh20/RF24, GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN
const byte address[6] = "00001";
char txNum = '0';
void setup() {
Serial.begin(9600);
radio.begin();
Serial.println("radio begin");
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_HIGH);
radio.stopListening();
}
void loop() {
Serial.println("ready to print hello world");
const char text[] = "hey dudes do you like it";
radio.write(&text, sizeof(text));
Serial.println(text);
Serial.println("end of loop");
delay (500);
}
/*
- Arduino Wireless Communication Tutorial
- Example 1 - Receiver Code
- by Dejan Nedelkovski, www.HowToMechatronics.com
- Library: TMRh20/RF24, GitHub - nRF24/RF24: OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
*/
#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(1,address);
radio.setPALevel(RF24_PA_HIGH);
radio.startListening();
Serial.println("listening");
}
void loop() {
Serial.println("checking");
delay(500);
if (radio.available()) {
char text[32] = "";
radio.read(&text, sizeof(text));
Serial.println(text);
Serial.println("recieved");
}
}