EasyManua.ls Logo

Emakefun RF-NANO - 3.3 One Send to Multiple Receive Communication

Emakefun RF-NANO
34 pages
Print Icon
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.
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