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.

Adafruits NeoPixels are awesome, the Arduino of LEDs. There are a couple tutorials on sound reactive LEDs with the NeoPixels, including one on Adafruit about making a drum set light up when you hit it. The video makes it look like it works, but look carefully and you’ll see other drums lighting up when a different drum is being played. That’s because they’re using microphones which are way too sensitive for a intra-drum set environment. To eliminate the cross talk, replace the mic with a piezo element and read the voltage spikes generated by force of the drum hits.

 

See it real life!

 See it in schematic!

(coming soon)

See it in code!

 

My first notable project on the RaspberryPi involved the Pi version of Minecrat and the wonderful Pandora-in-your-terminal app Pianobar. I thought it would be useful  fun to create a remote control in Minecraft that would work with Pianobar. I settled upon creating a ‘trigger’ block that could be right-clicked to bring up this menu of blocks. In the video below, the trigger block is sand. The block menu that pops up is updated with the current state of pianobar, so when I pause a song, the block turns from green to red. When I hit ‘next’, the next song starts playing and the first block turns back to green. I enjoyed myself quite a bit on this one.

 

and then for good measure I output the song title and artist to sky-writing in the Minecraft world. Enjoy

Disclaimer: I have not tested this code since the video was taken in February of 2013. The fundamentals are still good, but I doubt it still works out of the box.

https://github.com/MichaelSizemore/mcpi