Stap 5: De Software van de ontvanger:
#include < Servo.h >
#include < SPI.h >
#include "RF24.h"
Servo myservo;
SCK -> 13 / / MISO -> 12 / / MOSI -> 11 / / CSN -> 7 / / CE -> 8
RF24 radio(8,7);
Const uint64_t pijp = 0xE8E8F0F0E1LL;
int msg [1];
VOID Setup
{
myservo.attach(9);
Radio.begin();
radio.openReadingPipe(1,pipe);
radio.startListening();
}
void loop
{
Als (radio.available())
{
BOOL = false;
terwijl (! gedaan)
{
= radio.read (msg, 1);
myservo.write (msg[0]);
}
} Servo.h >}