EasyManua.ls Logo

Emakefun RF-NANO

Emakefun RF-NANO
34 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Copy right © 2018 Shenzhen Emakefun Technology co., Ltd.
31
Data sent by transmitter
Figure 3-3-1
Receiving data program code 1
Code pathRF-NANO Demo Program\One send to multiple receive communication\
Receive1\Receive1.ino
Source code
//Receiver 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();
Mirf.setRADDR((byte *)"FGHIJ"); //Set your own address (receiver address) using 5
characters
Mirf.payload = sizeof(value);