hi tack,
yes, i used "getting started" and every other example i could find.
with the getting started sketch i have to press "t" in serial monitor to set module 1 to ping out mode.
module 2 is in pong back mode automatically.
as module 2 is connected to a breadbord arduino i can't set that to ping out because there is no serial monitor access.
to overcome all this i would need a sketch with no room for errors. would that work?
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
void setup(void)
{
Serial.begin(57600);
radio.begin();
radio.openWritingPipe(pipes[0]);
radio.printDetails();
}
void loop(void)
{
int time = 3;
Serial.print("Sending number: ")
Serial.println(time);
radio.write( &time, sizeof(int) );
delay(200);
}
and on the receiving arduino:
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
void setup(void)
{
Serial.begin(57600);
radio.begin();
radio.openReadingPipe(1,pipes[1]);
radio.printDetails();
radio.startListening();
}
void loop(void)
{
Serial.print("Number received: ")
radio.read( &time, sizeof(int) );
Serial.println(time);
delay(200);
}
thank you,
stefan