![Emakefun RF-NANO Operating Instructions Manual Download Page 29](http://html1.mh-extra.com/html/emakefun/rf-nano/rf-nano_operating-instructions-manual_2398917029.webp)
Copy right © 2018 Shenzhen Emakefun Technology co., Ltd.
29
3.3 Implement a send to multiple receive communication
3.3.1 Experimental principle block diagram
3.3.2 program code
Transmit data program code
:
Code path
:
RF-NANO Demo Program\One send to multiple receive communication\All_Emitter
\All_Emitter.ino
Source code
//Transmitter program
#include <SPI.h>
#include "Mirf.h"
#include "nRF24L01.h"
#include "MirfHardwareSpiDriver.h"
Nrf24l Mirf
=
Nrf24l
(
10
,
9
);
int
value1
,
value2
;
void
setup
()
{
Serial
.
begin
(
9600
);
Mirf
.
spi
=
&
MirfHardwareSpi
;
Mirf
.
init
();
//Set your own address (sender address) using 5 characters
Mirf
.
setRADDR
((
byte
*)
"ABCDE"
);
}
Receiving device1
(
RF-NANO
)
Transmitting devcie
(
RF-NANO
)
Receiving device 2
(
RF-NANO
)