This sketch is intended to demonstrate the basic functionality of the audio library.
This sketch is intended to demonstrate the basic functionality of the audio library.
#include <RF24.h>
#include <SPI.h>
#include "printf.h"
RF24 radio(7,8);
void setup() {
Serial.begin(115200);
printf_begin();
radio.begin();
radio.printDetails();
rfAudio.begin();
}
uint32_t printTimer = 0;
void loop() {
rfAudio.handleButtons();
if(Serial.available()){
switch(Serial.read()){
case 'r': rfAudio.transmit(); break;
case 's': rfAudio.receive(); break;
case '=': rfAudio.volume(1); break;
case '-': rfAudio.volume(0); break;
}
}
if(millis() - printTimer > 1000){
printTimer = millis();
Serial.println("test");
}
}
Class declaration for RF24Audio Library.
Arduino Realtime Audio Streaming library.
Definition: RF24Audio.h:22