How can you transmit audio using a Bluetooth Dongle?

Hey Everyone,

I’m just a beginner with Arduino and what I’m trying to do is take an incoming audio signal and then transmitted through a Bluetooth dongle. The Bluetooth dongle that I’m using for this is the Sennheiser BTD 800 USB Bluetooth Network Card. I’ve currently been messing about with this SPP sketch from the USB Host shield library 2.0. What I’m wanting to do is to display the incoming audio signal in the plotter window. If anyone has any ideas on how to program it to do this, it would be much appreciated.

#include <SPP.h>
#include <usbhub.h>

// Satisfy the IDE, which needs to see the include statment in the ino too.
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#include <SPI.h>

USB Usb;
// USBHub Hub1(&Usb); // Some dongles have a hub inside

BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so
/* You can create the instance of the class in two ways */
SPP SerialBT(&Btd); // This will set the name to the defaults: "Arduino" and the pin to "0000"
int incomingAudio = A0;

void setup() {
  Serial.begin(9600);
#if !defined(__MIPSEL__)
  while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
#endif
  if (Usb.Init() == -1) {
    Serial.print(F("\r\nOSC did not start"));
    while (1); //halt
    pinMode(incomingAudio, INPUT);     // set pin A0 to be input

}
}

void loop() {

  Usb.Task(); // The SPP data is actually not send until this is called, one could call SerialBT.send() directly as well


  (SerialBT.connected); {
      incomingAudio = analogRead(A0);  
      SerialBT.println((incomingAudio)); // Send INCOMING AUDIO
    }
    {
    if (Serial.available())
      SerialBT.write(Serial.read());
    if (SerialBT.available())
      Serial.write(SerialBT.read());
    }
}

I’m new with Arduino and I’m attempting to use the Arduino to process an incoming audio signal and then transmit the audio through a Bluetooth dongle. The problem that I’m having with this is that I’m wanting to display the transmitted audio signal in the serial plotter window, but I have no idea how you set this up in the sketch. I currently have a post above with the SPP sketch from the USB Host shield library 2.0. If you have any idea how to program this I would really appreciate it.

Tricky, I don’t thing you can do this with any of the AVR class of Arduinos, you have to use one of the ARM based ones to stand any chance. What one are you using?

I'm not to sure what that means, do you mean what board am I using? If so it's a Arduino Uno.

If so it's a Arduino Uno.

In that case you can’t do what you want, a Uno is not fast enough and doesn’t have enough memory.

So what kind of board would be suitable for this? and what do you mean by it's not fast enough?

what do you mean by it's not fast enough?

It has a 16 MHz clock.

This is not a beginner project. Start with the basic examples that come with the Arduino development software, to learn the language additions and the special features of the board.

Ok, the only reason I thought this could work is because I've seen people use the Arduino Uno with a Bluetooth dongle to connect with PS4 controllers, and I thought I could rework this to transmit Audio. So what kind of a board would be suitable for something like this?

At least an Arduino Zero or Due, but more like a Teensy 3.6 and even then I don’t know if it will be fast enough.