Volume control

Hello everyone, I'm currently developing a university project using the Arduino. The thing is, I'm not a programmer... so I thought I'd post here for help.

I want to make the Arduino to get the sound volume information from the computer (through the USB cable, or the bluetooth communication, depending on the Arduino model) and manipulate it through the use of a potentiometer. Kinda like a remote controller.

For the class, I need to make it run on Windows XP. Is that possible?

The Arduino can not read any of the PC hardware, including the PC's volume setting.

You could have a program on the PC read the setting, and send that value to the Arduino using the serial port.

What sort of "manipulation" do you plan to do with that value?

I was planning to read the volume from Windows, not directly from the sound boxes. This one: This fits as "software" doesn't it?

Then control the volume.

The thing is, I'm not a programmer... so I thought I'd post here for help.

What you want to do appears to involve windows programming, windows API calls and such. Not really anything to with external hardware such as the arduino. If you want to write programs involving the windows volume control, then windows programming forums would be a good place to start.

I think maybe I haven't been clear about the project... What I'm trying to do is control the volume on the OS through a pontentiometer plugged to the arduino. Now that you mention it, I believe it involves arduino AND windows programming.

That is completely possible! In Vista/Win7 you can use the Endpoint Volume contol to accomplish that. http://msdn.microsoft.com/en-us/library/dd370839(v=VS.85).aspx

Just take the sample from that page and mix in the serial communication samples from the arduino site to communicate with the arduino.

For example, in pseudocode on Windows:

Find the volume device(see sample from msdn link, above) Open the serial port Read from serial port if U, adjust volume up. If D, adjust down.

or, read value from arduino. Set volume to that value.

The communications samples in the library would help with interfacing from Arduino to Windows in a variety of languages. You are going to need to exercise some programming skills though with this one... Especially if you haven't used COM before or have never seen AddRef() or Release()!

I believe it involves arduino AND windows programming.

That is correct, however the Arduino side is pretty simple. All an Arduino can do is send data via a PC comm port, so the Arduino sketch would just be a simple analog read of the pot and sending the value to the PC via serial communications. The windows program would need to receive the serial message and convert the received data value and send it to some windows API that can change the sound board volume.

Lefty