This sketch is demonstrates the use of private channels (node-to-node) in a multi-radio group.
This sketch is demonstrates the use of private channels (node-to-node) in a multi-radio group.
#include <RF24.h>
#include <SPI.h>
RF24 radio(7,8);
void setup() {
Serial.begin(115200);
rfAudio.begin();
}
void loop() {
rfAudio.handleButtons();
if(Serial.available()){
switch(Serial.read()){
case 'r': rfAudio.transmit(); break;
case 's': rfAudio.receive(); break;
case '1': rfAudio.broadcast(1); break;
case '2': rfAudio.broadcast(2); break;
case '3': rfAudio.broadcast(255); break;
}
}
}
Class declaration for RF24Audio Library.
Arduino Realtime Audio Streaming library.
Definition: RF24Audio.h:22