📜 ⬆️ ⬇️

Convenient volume control for PC

Arduino / Freeduino (in the usual - not Mega version) has 6 ADC inputs that allow you to measure the voltage value (in the range of 0-5V). His rate of fire is not very fast, so the digital oscilloscope will not work :). But I managed to make a very simple volume control for a computer with three sliders - separate Master, separate Wave, separate MIDI, and place it in the 5 "bay of the computer.
image image
Under the cut a small description, links to source codes, video, and the contest “guess the melody” :)

The implementation is simple as two kopecks - we collect voltage dividers in variable quantities on variable resistors. Resistance can be taken in a wide range: from 470 Ohm to 500 kOhm and even wider. I found the store at 330k. On the Arduino side, the program measures the voltage at the inputs, and if it detects a change, sends a new value along with the channel number to the computer. From the PC side, the program opens the port, and upon the arrival of data, changes the volume on the corresponding line of your sound card.

As usual, I post all the sources, as well as the binaries, and the scheme (if you can call it that :)).
Sources + binaries
scheme :)
There is a small description for the program.

Source codes tried to write simple and clear. He didn’t understand himself in detail with adjusting the volume under Windows - he used someone’s library (long ago, when he was a fidoshnik, he knew what ZMH was and regularly visited pointovki someone sent it to me on a netmyl).
')
And in conclusion, I post a small video with a demonstration of the work - here somehow the “guess the melody” contest turned out by chance. It is necessary to guess the melody with 7 notes - the prize, unfortunately, is not provided, but I would be very pleased if there are people with overlapping musical tastes among the habra people.

Source: https://habr.com/ru/post/58737/


All Articles