Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
arduinocc
Published © MIT

Easy DIY Bluetooth Speaker Project

Creating your own Bluetooth Speaker is a simple and fun project, which you can use around the house or in the garden, even while camping...

BeginnerFull instructions provided1 hour409
Easy DIY Bluetooth Speaker Project

Things used in this project

Hardware components

USB Speakers
×1
Espressif ESP32 Development Board - Developer Edition
Espressif ESP32 Development Board - Developer Edition
×1
SparkFun TRRS 3.5mm Jack Breakout
SparkFun TRRS 3.5mm Jack Breakout
×1

Software apps and online services

Microsoft Visual Studio 2022
Visual Micro

Story

Read more

Schematics

ESP32 to Female Jack Wiring

Basic Wiring Diagram

Code

ESP32_BluetoothAudioExample.ino

Arduino
Main INO Example for this project using ESP32-A2DP v1.8.1 and audio-tools v0.9.6 Libraries
/*
  Streaming data from Bluetooth to internal DAC of ESP32

  Copyright (C) 2020 Phil Schatzmann
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses></http:>.
*/

// ==> Example to use built in DAC of ESP32
// 
// From Example:
// examples/bt_music_receiver_to_internal_dac/bt_music_receiver_to_internal_dac.ino

// Connect one Speaker wire to GND, the other to GPIO25

#include "AudioTools.h"
#include "BluetoothA2DPSink.h"

AnalogAudioStream out;
BluetoothA2DPSink a2dp_sink(out);

void setup() {
	a2dp_sink.start("vMicroBT");
}


void loop() {
}

Credits

arduinocc
5 projects • 13 followers
Arduino compatible IDE for Microsoft Visual Studio and Atmel Studio 7 with unique USB Debugger, Trace, Pin Viewer and Plotter, GDB Debugging
Contact

Comments

Please log in or sign up to comment.