I wanted a media center. I priced out cases, power supplies, hard drives, cheap motherboards, etc. and figured I could build one for a couple hundred bucks or so. Then I heard about people using Raspberry Pi’s as media centers. Did a bit of research and got me a Pi and set up OpenElec on it. Plugged in an old 500 GB USB drive. I had a media center for about a quarter of what I was going to pay.
Thing is, getting the Pi set up was so much fun, I decided to buy another one just to play with. A week later I bought an Arduino Uno. I even pulled my barely touched Beagle Board out of cold storage and plugged it in. I’ve been having a blast the last couple of weeks playing with all these new toys. Bought a bunch of electronic parts, breadboard, hookup wire, gathered up some other junk I had stashed here and there.
Back back story
When I was 11 or 12 years old, one of my class mates brought in this Radio Shack 75-in-1 Electronics kit and did a little presentation on how to hook up various circuits. I was amazed. I begged and pleaded my mom to get me one for Christmas. I actually remember the exact thought I had at the time – that with that kit, I would never, ever be bored again. I got my kit, and while the never, ever part was questionable, I certainly spent many, many, many hours playing with electronics over the next few years. I outgrew the kit and bought all sorts of other build-it-yourself stuff. I learned how to solder. I could tell you the difference between pnp and npn transistors and precisely how they worked on a molecular level.
Where I grew up was a vocational school, Blue Hills Regional, that offered an electronics program. It was perfect timing. I signed up to go there for high school. Then disaster struck, in the form of my own bad judgment. My stepfather was an electrician. In some misguided attempt to win favor with him, I switched from the electronics program to the electrical program and wound up becoming an electrician myself. I learned soon after graduation how much I hated being an electrician, stopped doing it, and it wasn’t until about 15 years later that I discovered Flash and programming and a similar joy to what I had found doing electronics.
Back to the present
So getting involved with the Raspberry Pi and Arduino and Beagle Board, I found myself playing with LEDs and resistors for the first time in decades. It’s been great rediscovering all this stuff I used to know back when I was just a kid. So I’ve become a master at making LEDs blink, but I wanted to do something that could be considered practical on some small level.
Great projects are often the result of solving some problem. My problem is controlling the media on my pc. These days I’m doing work on my Mac, but usually have some podcast or music playing on Winamp on my pc laptop. If I want to pause or restart, I either have to move the mouse over there (I’m using Synergy) and click on the play button. Or reach over and hit the function key and the media play/pause key. It’s a horrible problem, I know. Not sure how I’ve managed to go on this long. I try to be strong.
But my thought was to have a single button sitting on the desk. I push the button, the media toggles. A bizarre plan started to form. Have a button hooked to the Pi send a message across the network to toggle the music state. I have achieved this. And I’m sitting in the living room clicking this button relentlessly, starting and stopping the music playing in my home office. My wife has just retreated upstairs, pretending not to be annoyed.
Crap, this post is already too damn long. Stay tuned for Part II in which our hero details how he accomplished this nearly impossible feat in the most convoluted way possible, using only Python, Node.js and C#.
Click for Part II of this amazing saga.