McCullen Pi and Arduino Show and Tell

2017 January 19

I had the pleasure today of attending Kevin McCullen’s IEEE-sponsored presentation of… well, honestly, gadgets, doodads and the fruits of his tinkering. The presentation was hosted by Global Foundries, in Essex, VT.

Kevin is an assistant professor of computer science at SUNY Plattsburgh and long-time friend and associate of David Hathaway (who taught computer architecture / CS 222 when I took it at UVM).

Kevin presented a number of projects he’s worked on in his spare time using Raspberry Pi and Arduino. One of my favorites was a humidity sensor he used to tell if his kids had showered in the AM when they were supposed to!

I have a Pi lying around the house here somewhere. He’s inspired me to turn it into a streaming music server for my home. I’ll let you know how that turns out.

Update 2017-05-20: I’ve set up my Pi to stream audio from my NAS using the Volumio music library. We just upgraded by installing a IQAudio Pi-DAC+.

DAC hat

This is really easy to do and our system now has audiophile-grade output.

Here’s how:

  • Volumio is free. Download disk image and burn to microSD card (16 GB or up).

  • Almost any Raspberry Pi other than the very earliest models will work. Replace the OS / disk image that came with the Pi with the microSD with the Volumio image.

  • Connect to your LAN so that the Pi can discover your NAS. In configuration select your NAS as storage device. Volumio will automatically begin scanning and building your library.

  • At this point, you will have a functional streaming music server. Connect audio output to powered speakers or your stereo and you’re off to the races.

  • UI is accessible from any device in your home with a web browser.

  • For the audiophile upgrade: Get the DAC hat from IQAudIO. Assembles in a minute; no soldering. Change Volumio config to use an I2S DAC. For DAC model, select IQAudIO DAC Plus. Reboot your Pi. Done.

Lemme know if you have any questions.

Update 2017-07-12: The fun part: getting all your files cleaned up and categorized. As I have a (clearing throat) very large music library, updating tagging manually just isn’t practical. So I made use of the superb Mutagen library for Python, and wrote a few programs to remove unwanted tags, clean up remaining tags, create missing tags as needed, and programmatically assign genre tags to files. Mutagen works like a charm. The API is easy to work with and supports almost any file type you can imagine (I have MP3, M4A, OGG, APE, FLAC, and WAV files in my library). My only complaint (and it is minor) is that there are slightly different interfaces for each file type. I suppose this makes sense since, for example ID3 tags are highly structured, and FLAC tagging is pretty much a free-for-all. Nevertheless, I’d have preferred a little more in common between types. No biggie though, and Mutagen retagged and saved tens of thousands of files without incident. If you’re interested in the source code, please let me know.

Update 2017-08-15: Still unsatisfied with genre tagging so I’m embarking on a little (supervised) machine learning project to extract fingerprints and then categorize audio files by genre. This bit will merit its own post. Stay tuned.

Tags: gadgets