I just got my RF Nanos, and there is only one example set.
Three programs total: transmit, receive one, receive more than one.
They all declare like this:
Nrf24l Mirf = Nrf24l(10, 9);
The library uses four parameters, so I added two pins.Same thing:
src\main.cpp:10:40: error: no matching function for call to ‘Nrf24l::Nrf24l(int, int, int, long int)’
Nrf24l Mirf = Nrf24l(10, 9, 13, 2000000);
This is another one that should work in Arduino IDE.
//Transmitter program
#include <SPI.h>
#include "Mirf.h"
#include "nRF24L01.h"
#include "MirfHardwareSpiDriver.h"
Nrf24l Mirf = Nrf24l(10, 9);
int value;
void setup()
{
Serial.begin(9600);
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
//Set your own address (sender address) using 5 characters
Mirf.setRADDR((byte *)"ABCDE");
Mirf.payload = sizeof(value);
Mirf.channel = 90; //Set the channel used
Mirf.config();
}
void loop()
{
Mirf.setTADDR((byte *)"FGHIJ"); //Set the receiver address
value = random(255); //0-255 random number
Mirf.send((byte *)&value); //Send instructions, send random number value
Serial.print("Wait for sending.....");
while (Mirf.isSending()) delay(1); //Until you send successfully, exit the loop
Serial.print("Send success:");
Serial.println(value);
delay(1000);
}