RF24Audio v1.0
Arduino Audio Streaming Realtime with NRF24L01 radios
|
Arduino Realtime Audio Streaming library. More...
#include <RF24Audio.h>
Public Member Functions | |
RF24Audio (RF24 &_radio, byte radioNum) | |
Setup the radio and radio identifier. | |
void | begin () |
Initialize the radio and audio library. | |
void | volume (bool upDn) |
Volume Control. | |
void | setVolume (char vol) |
Volume Control. | |
void | transmit () |
Control transmission through code. | |
void | receive () |
Stop transmission through code. | |
void | broadcast (byte radioID) |
Control of Private or Public Communication. | |
uint64_t | getAddress (byte addressNo) |
Get any of the preset radio addresses. | |
void | handleButtons () |
Handle button inputs. | |
Arduino Realtime Audio Streaming library.
This class implements an Audio Streaming library using nRF24L01(+) radios driven by the Optimized RF24 library.
RF24Audio::RF24Audio | ( | RF24 & | _radio, |
byte | radioNum | ||
) |
Setup the radio and radio identifier.
_radio | The underlying radio driver instance |
radioNum | The radio identifier |
void RF24Audio::begin | ( | ) |
Initialize the radio and audio library.
Generally called in setup to initialize the radio
void RF24Audio::broadcast | ( | byte | radioID | ) |
Control of Private or Public Communication.
Call this function to establish private communication between nodes in a radio group, or to switch back to public transmission.
radioID | Set the radioID of the radio to communicate privately with. |
uint64_t RF24Audio::getAddress | ( | byte | addressNo | ) |
Get any of the preset radio addresses.
Useful for listening nodes who wish to create private or additional radio groups The library has 14 predefined radio addreses. All radios listen/write on the first two addresses (0, 1), and engage a private channel based on the radio number. Radio 0 listens on address 2, Radio 1 on address 3, etc.
addressNo | Numbers 0 through 14 to access any part of the defined address array |
void RF24Audio::handleButtons | ( | ) |
Handle button inputs.
Must be called regularly for button functionality
void RF24Audio::receive | ( | ) |
Stop transmission through code.
Call this function to stop transmission
void RF24Audio::setVolume | ( | char | vol | ) |
Volume Control.
vol | Set at 0 to 7 for range of volume control |
void RF24Audio::transmit | ( | ) |
Control transmission through code.
Call this function to begin transmission
void RF24Audio::volume | ( | bool | upDn | ) |
Volume Control.
upDn | Set 0 to lower volume, 1 to raise volume |