Paso 4: Transmisor Software:
#include < SPI.h >
#include "RF24.h"
int msg [1]; SCK -> 13 / / MISO -> 12 / / MOSI -> 11 / / CSN -> 7 / / CE -> 8
Radio(8,7) de RF24;
const uint64_t tubo = 0xE8E8F0F0E1LL;
int potpin = 0;
int val;
void setup(void)
{
radio.Begin();
radio.openWritingPipe(pipe);
}
void loop(void)
{
Val = analogRead(potpin);
Val = mapa (val, 0, 1023, 0, 179);
MSG [0] = val;
radio.Write (msg, 1);
}