Skip to content
Jack Devonshire edited this page Jul 7, 2024 · 10 revisions

Introduction

This project is my first attempt at creating a homemade button box, with limited electrical experience and only a few Raspberry Pi projects under my belt. I have documented the whole process so anyone in my shoes can hopefully recreate this with relative ease.

It's probably important to note that this is not designed for longevity. I could've soldered many things but I decided to sort of "bodge" wires together and use breadboard connectors over soldering. It will probably break on me in a year and I will regret my decisions, but I just really just wanted to get it working without fiddling with a soldering iron.

The Finished Product

Click the image for a video demo!

I got a custom metal panel laser cut for my project, but you will most likely just be left with the wooden box with switch cut-outs (which is much, much easier because you will just need a 14mm and 16mm drill bit, and a small saw to cut out the LCD square).

How It Works

I won't dive too much into the technicalities of it here (that's for later), but essentially the box is powered by a Raspberry Pi 3b (although it could also work with a Raspberry Pi Pico - with WIFI and header pins). On your desktop you will have to run a Python Flask server that interacts with the client Python running on the button box.

The client code is designed to be as dumb as possible, every time you flick a button it sends an API request to the server, pretty much "Hey, X button has been turned ON/OFF, what should I display on the LCD?" and the server does something according to a configuration file you have setup and then responds with "Hey, display this...". Of-course the whole thing runs over a REST API, the box isn't actually yelling out commands to your computer - that would be ridiculous.