Dreambox: Raspberry Pi and Teensy, living in perfect harmony

Okay, so I couldn’t get the headline to scan to fit that godawful song, but here’s the thing: I mentioned before that my Dreambox project – a way of playing music to lull me to sleep – would be driven by a Raspberry Pi but would also involve a Teensy. And you probably want to know why.

The mighty Teensy. Who wouldn’t want one of these in their project?

The answer is: well, no good reason, really.

I do have something of a fascination – maybe ‘fixation’ is a better word – for hooking devices together using serial communications. It seems suitably retro-y somehow.

On my HMV1960 project, which both precedes the Dreambox and post-dates it (by dint of not being finished yet) I chose to use a Teensy to drive a small TFT display, a matrix LED display, a bunch of RGB LEDs and also read some sensors. Maybe I could have used the Raspberry Pi for some or all of that, but libraries were more readily available for Ardiuno-type boards, of which the Teensy is one.

Serial comms is also something I’ve been tinkering with for some robotics projects (currently on the back-burner). So I’ve developed small libraries in C++ (for the Arduino side) and Python (for the RPi).

My previous Dream Machine, built for the More Significant Other, employed a Teensy with PJRC’s excellent audio board. Aside from a volume control, LED indicator light and ‘start’ button, there wasn’t much more to it.

So why not just do the same this time? I wanted a TFT display again, but I could do that with the Teensy.

Well, some people refer to mission creep. I prefer to say that if a thing’s worth doing, it’s worth massively over-doing in ways you can’t even envisage when you set out on the project.

With the earlier Dream Machine I had the benefit of the More Significant Other watching over me. She wanted the product delivered on time with maximum simplicity. My hands were tied.

But the Dreambox is mine, all mine. I can procrastinate and add ‘features’ as much as I like.

Being a hacker (I’m editor of a couple of infosecurity journals) I knew I wanted it to be network connected. So the Raspberry Pi seemed an obvious choice. Indeed, I’ve already got a web server running on it.

So, a Raspberry Pi with a DAC it is. But having got that far, why not do everything via the Pi? The TFT display I want to use is an SPI device. The Pi has SPI. I’m thinking I might include some RGB LEDs again, driven via an I2C board from Adafruit. The Raspberry Pi does I2C. Why do I need the Teensy?

Seriously? Have you not been listening? The answer is … because.

Leave a Reply

Your email address will not be published. Required fields are marked *