EasyManua.ls Logo

Emakefun RF-NANO - Page 23

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.
23
Transmitting data from the transmitter
Figure 3-1-2
Data receiving program code
Code path RF-NANO Demo Program\Peer-to-peer Communication\Receive\ Receive.ino
Source code:
//Receiver program
#include <SPI.h>
#include "Mirf.h"
#include "nRF24L01.h"
#include "MirfHardwareSpiDriver.h"
Nrf24l Mirf = Nrf24l(10, 9);
int value;
//String
void setup()
{
Serial.begin(9600);
Mirf.spi = &MirfHardwareSpi;
Mirf.init();
Mirf.setRADDR((byte *)"FGHIJ"); //Set your own address (receiver address) using