Skip to content

WillyBilly06/ESP32-Bluetooth-Audio-with-Volume-Control-Using-Rotary-Encoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 

Repository files navigation

ESP32 Bluetooth Audio with Volume Control Using Rotary-Encoder

I was messing around with Phil Schatzmann's library and how to use a Rotary Encoder, and then I accidentally created a Bluetooth device using a Rotary Encoder to control the volume. The device's volume will also update when the Rotary Encoder is being rotated.

In addition, when the device is inactive for 1 minute (changeable), it will enter "deep sleep" mode. In order to wake up the module, you need to connect PIN 15 of ESP32 with GND via the pull-down resistor. You can modify the auto shutdown time by changing the value of minutes in the code.

Updated: It works on Android, IOS, and Samsung Watch (Wear OS, but not sure about Tizen OS).

The built-in LED of the board will be lit up when your phone is connected to Bluetooth. Also, when you change the volume, the LED on WS2812B will also lit up depending on the volume of the device, and the number of LEDs that will illuminate is 10 (you can change the number of LEDs depending on your project)

PCM5102A

Here is the information on how to wire the PCM5102A module to the ESP32:

PCM5102A ESP32
LCK GPIO 25
DIN GPIO 14
BCK GPIO 26
SCK GND
GND GND
VIN 3V3 OR 5V (VIN)

Rotary Encoder

Here is the information on how to wire the Rotary Encoder to the ESP32:

Rotary Encoder ESP32
CLK GPIO 33
DT GPIO 32
GND GND
VIN 5V (VIN)

WS2812B Led Strip

Here is the information on how to wire the WS2812B Led Strip to the ESP32:

WS2812B ESP32
V+ VIN (5V) or 3.3V
Data In GPIO 18
GND GND

Library Requirements

https://github.com/pschatzmann/ESP32-A2DP
https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-installation

LICENSE

MIT LICENSED

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages