snapshot
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Receive Sound Data from Bluetooth A2DP
|
||||
|
||||
We receive some music via Bluetooth e.g. from your mobile phone and display it as CSV
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* @file streams-a2dp-serial.ino
|
||||
* @author Phil Schatzmann
|
||||
* @brief see https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-stream/streams-a2dp-serial/README.md
|
||||
*
|
||||
* @author Phil Schatzmann
|
||||
* @copyright GPLv3
|
||||
*
|
||||
*/
|
||||
|
||||
#include "AudioTools.h"
|
||||
#include "AudioTools/Communication/A2DPStream.h"
|
||||
|
||||
|
||||
A2DPStream in;
|
||||
CsvOutput<int16_t> out(Serial, 2); // ASCII stream as csv
|
||||
StreamCopy copier(out, in); // copy in to out
|
||||
|
||||
// Arduino Setup
|
||||
void setup(void) {
|
||||
Serial.begin(115200);
|
||||
|
||||
// start the bluetooth audio receiver
|
||||
Serial.println("starting A2DP...");
|
||||
auto cfg = in.defaultConfig(RX_MODE);
|
||||
cfg.name = "MyReceiver";
|
||||
in.begin(cfg);
|
||||
}
|
||||
|
||||
// Arduino loop
|
||||
void loop() {
|
||||
copier.copy();
|
||||
}
|
||||
Reference in New Issue
Block a user