Hello computer, how loud are you?

So people, I would like to program an Arduino to control a row of 10 LED's that indicates the current volume (0 - 100 %) of the computer it is connected to (you know, the "height" of the volume control slider in Windows). [u]Not volume control[/u], just simple indication.

So, what I'm asking is if there is a simple way to ask the connected computer what the current volume level is and of course get som sort of useable response. The rest of the project is pretty straight forward 8)

Microsoft has a webpage which describes the systray program which allows the user to alter the volume levels. The program is SndVol32.exe. But the webpage says "Note that there is no way to programmatically access the functionality of this program". It would appear that the answer to your question is no.

Pete

It should be easy enough if you use Windows and know C# programming. Here is what I found:

http://www.codeproject.com/Articles/18520/Vista-Core-Audio-API-Master-Volume-Control

You then need to add a Serialport object to communicate with your Arduino.

Yeah, I'm afraid my programming skills are limited to Arduino only. I see your point tough. Some sort of script that constantly transmits the variable.

there is some info about the python way - http://stackoverflow.com/questions/18112457/python-change-windows-7-master-volume -

Guess I'll have to learn Python.

Seeing as it appears that it can be done, I went googling for some C code. There's C++ code here which prints the current master volume setting. I compiled and tested it. It works on Win 7 Pro X64.

Pete

That seems like something I could use. Nice post.