How to implement volume control? #371
-
Hello! This repository looks very promising. I was looking through the example codes and most of it made sense to me, being a complete beginner to Arduino and ESP32. However, how do you implement the AVRC commands in the Arduino sketch? I can't really figure it out. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think people would usually link avrc command with buttons, so I suggest that you Google how to use and debounce buttons or use buttons with interrupts. But first test your button code with the help of Serial.print() before you move to the next step. E.g To use the increase volume button you would just do something like a2dp.setVolume(a2dp.getVolume()+const_offset); where const_offset is a numeric constant that defines how much the volume should increase with each press. |
Beta Was this translation helpful? Give feedback.
I think people would usually link avrc command with buttons, so I suggest that you Google how to use and debounce buttons or use buttons with interrupts.
But first test your button code with the help of Serial.print() before you move to the next step.
E.g To use the increase volume button you would just do something like a2dp.setVolume(a2dp.getVolume()+const_offset); where const_offset is a numeric constant that defines how much the volume should increase with each press.