Family Boxes (a project I'm working on)

I’ve spent a fair chunk of today playing with, and learning about, MQTT. Not the Adafruit IO implementation of MQTT (although I give them props for trying to simplify what could be a confusing protocol), but the original beast itself.

I was disappointed in being unable to keep the Adafruit IO script running for any longer than about 15 minutes and decided that I should grab the bull by the horns, and go directly to the source.

So, I’m not entirely sure how I ended up here, but after some toying with the paho-mqtt package, and bagging myself a free mosquitto broker instance courtesy of CloudMQTT, I’ve managed to write myself a couple of little scripts:

The file is designed to fire off random values between 0 and 255 to the three colour (red, green, blue) channels I’m using. This is for testing purposes and will be replaced by other number generating sensors, just as soon as I figure them out.

The more interesting one is, which subscribes to the RBG channels above, and uses the data passed to light up my UnicornHAT.

The top line of colour is the combination of the three lines below it. It’s very jumpy right now, with colour changes once per second, but once I have some better inputs (which are going to take the form of boxes with the aforementioned ambient sensors) it should be a far more gradual affair.

Anyway, the basic idea is my sisters and I will each have our own input boxes (Emily will be red, I’ll be green, and Jessica will be blue), which will feed data back into the hub box (at my parents’ house) which will use it to power an RGB lightbox.

Right now this is nothing more than a concept, than a solid idea, but the code above is the first step towards making something of it. The next step is working out what sensors I can use to get meaningful data from the feed boxes.

I wanted to very quickly post an update to this idea, as I’ve decided I’m going to try building this project in time for xmas.

This has been spurred on by my ownership of a 3D printer, and the fact that 3D printed Lithophanes would work fantastically well for purpose.

To this end, I spent most of lunch yesterday putting together this mockup:

The whole thing will be built into a shadow box / deep box frame, itself split into four quarters, with a different lithophane in each, each individually lit from behind by some RGB LEDs.

As mentioned above, individual input from my sisters and I (via our own electronic devices) will generate a number between 0 and 255, which in turn will create that amount of brightness for that specific colour quarter, with the combination of the three colours dictating what colour my parents will be.

Right now I’m still at the concept stage, and I have no idea how I’m going to power the REG LEDs (yet), but I think I’m getting closer to a solution.

1 Like

Still very much a work in progress:

You can’t quite see it, but there is a Feather Huzzah, and a tangle of wires, are currently sat on top controlling the LEDs. The LEDs in question are updated once every 10 seconds, based on data received via MQTT.

Blue doesn’t work very well - maybe if it was a bit lighter, but at this point it’s a touch out of scope of what I’m trying to do - that, and I’m running out of time.

Proudly sponsored by Bytemark