Bindicator & Remote Data Transfers

14 Feb 2025

I make so many notes digitally and in my notebook, and so many of them seem to be directed towards no one. It seemed a shame to waste any insight I gain and knowledge I develop so I'm gonna start throwing it down here. I already write a fair amount on Medium, but that's mostly political/philosophical ideas. I want this to be more of a casual throwing down of ideas, a place where I can chronicle my progress as I build cool new stuff, so I'm just gonna jump into it.

For a bit of context, I've been working on making a functioning prototype of an interactive site management software, and fell down the rabbit hole and have started building an access control system from scratch just sort of because I can. The idea was to make modular sensors which I can easily tailor to different use cases using ESP32s, and sort of centralise it all in a single server which would process and display everything through a browser and/or desktop app. This idea has been bouncing around for ages, I just didn't have the skill to pursue it, but after creating a QR style matrix code from scratch, making a few games and exploring complex concepts in programming, I thought it was time I got my hands dirty with some software.

My ongoing experiment is the YIKES project. A backronym for 'Your Ideal Kernel for Experimental Systems', it sort of acts as my little dumping ground for server type function just to keep my desktop clear. Right now it's only really an old Raspberry Pi modified to take USB-C power, a fan, and a custom 3D printed case (I added a toggle switch though which is awesome). But that wasn't enough exposure to proper hardware stuff, so I'm making a 'bindicator'. It seemed appropriate because I'm terrible for taking out the bins on time, and I live in Glasgow and it was a Glaswegian (Darren Tarbard) who originally came up with it!

A bindicator basically just is a bin shaped little model that lights up a specific colour depending on what bin is due to be collected by the council that day or the following day depending on how you set it up.

I'm building it from the ground up, literally the only thing I started with was an ESP32-C6 and a couple of LEDs and some fragments of know-how. I usually program in C# but firmware is (usually) written in C or C++, so I consulted with AI to get a foundation for some code to allow for the ESP32 to automatically connect to the wifi and handle an http post function. After tinkering with my own custom SensorSimulator software, I was able to wirelessly send data to the ESP32 from my desktop. I didn't realise it until it happened, but I had never made something that successfully communicated from one device to another like this, so I was quite proud.

The setup is pretty simple, apart from the wifi connection code, I essentially just use a switch statement to parse an int from the incoming json payload and attached LEDs to the breadboard where I'm prototyping. Using GPIO pins 2 and 4, the switch statement runs through each of the combinations, so 0 is both of, 1 is first LED lit exclusively, 2 is second LED lit exclusively, and 3 is both lit. This way, I can have a green and blue LED light up depending on the scheduled bin collection. That is literally all that is required for the firmware on the ESP32, everything else will be done from a program I'm yet to make running on my YIKES server, which will periodically send signals to the bindicator and light up appropriated.

Once all of that is built though, I can move onto the fun part of hardware. Prototyping is great fun, but I find soldering and maximising the quality and efficiency of the build to be incredibly rewarding. I have a background in design so I suppose that makes sense, but this aspect of it is not a muscle I get to flex very often so I'm excited!

The next step will be tough though. Glasgow City Council don't have an open API to interact with, and they have a funny calendar layout to show when the bins are collected. Thankfully it's all contained in html rather than any crazy embedded java or anything, but I've never done any web scraping. It shouldn't be too tough though, it just comes down to properly formatting date data as a string, since the element I need has that as the title. I also need to make sure the link I have updates the displayed dates dynamically, otherwise I'm definitely in trouble.

I want to maintain as much control of the code as possible though, without relying on external libraries. Nothing against them, I just find that building my own systems is an excellent and quick (albeit gruelling) way to learn. With any luck I can get the bulk of this project done over the weekend, but we'll have to see.

home

projects

about

Copyright © 2025. Ryan Appleyard. All Rights Reserved