![Emakefun RF-NANO Скачать руководство пользователя страница 31](http://html1.mh-extra.com/html/emakefun/rf-nano/rf-nano_operating-instructions-manual_2398917031.webp)
Copy right © 2018 Shenzhen Emakefun Technology co., Ltd.
31
Data sent by transmitter
:
Figure 3-3-1
Receiving data program code 1
:
Code path
:
RF-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
);