My desktop computer setup has no volume buttons whatsoever. This is a real problem that needs to be solved. But often things don’t get done without deadlines. I only have two hours til a respectable bed time. To make this more fun, I will write updates as they happen without post-editing. Let’s get started:

Research

X:33 РI have a nice potentiometer from Sparkfun that should work well. That with an Arduino would be a nice MVP. Software?

X:42 – NirCmd is a good starting point

X:45 – Looks like pulling data in from the Arduino over a COM port and reading it in a Batch script will work. That’s good enough for me.

Decide

X:49 – Analog pin on an Arduino will read voltage across a potentiometer. Arduino will scale that level up to whatever NirCmd likes to see, then constantly send out that level. A Batch script will run on my PC watching that COM port for a change in the value. When it reads a new value it will set the audio level appropriately

Do

Y:14 РResistor Divider and Arduino analog input values I should expect to see. Resistor Divideer

 

Y:29 – Lost my friendly book of common resistor values. A minor panic ensued. Fortunately my junk bin had plenty of resistors. Hardware is ready to go.

Arduino and Potentiometer

Y:45 – Arduino code done

2-Hours Up!

Z:38 – Well, I didn’t make the 2-hour deadline. The last hour was spent unsuccessfully fumbling around a Batch script trying to read my COM port. I’m going to check out powershell and give myself some extra time.

1st Overtime

A:05 – PowerShell made it no problem. I now have a working butter-smooth volume knob! Yes it is ugly, but the only criteria was functionality. Plus, I might need another 2-hour project sometime soon.

 

2015.06.29 PowerShell

 

My original plan worked out pretty well, with the exception of trying to read a COM port in a Batch script. This was a pretty straightforward and forgiving project to attempt in 2 hours. But it is exactly the kind of project that wouldn’t get done without this kind of push.

Comments are closed.

Post Navigation