WS2812 Headlight
Last updated: 31 Jan 2026 - 21:29
The PCB for this project was sponsored by PCBWay. While I was planning the project anyway, the choice to use their service was based primarily on the offer of a free board.
I'm working on a Hacky Racer, that is an electric go-kart type vehicle for a UK based racing competition. The budget is strictly limited to keep the competition field level, but one of the permitted extras is lights (they come under the safety category). For our racer we decided it would be fun to have some headlights that looked like eyes and could be animated. So while we wait for batteries to arrive for the project, I started a design.
The brief was to have something about 100mm diameter and that could display a range of patterns and animations. I had a reel of standard WS2812B LEDs (like Neopixels) so they seemed like an obvious choice. We want to be able to connect the lights into whatever battery we use so we wanted a wide range of input voltages (at least 12 to 48V), and we want the animation of the lights to be related to the vehicle, maybe they look left and right as we steer, so we needed some sort of comms.
NiimCtl
Last updated: 20 Oct 2025 - 21:58
I recently bought a NiimBot B1 printer on Aliexpress based on the assumption that it must be easy to use. There were mentions of an Android app (I have an Android device so that's a good backup) and some promising looking things on GitHub. I'd sort of assumed that these things were cheap and popular because they were really easy to build into your workflow for whatever labeling project you had in mind. In the end it turned out not so easy.
First I tried NiimPrintX, this looked promising. It had a GUI but also a CLI tool and it was just
OggCamp 2024: The Printer That Took A Decade To Tune
Last updated: 12 Oct 2024 - 15:17
At OggCamp this year I was on the scheduled track and presented a brief history of my RepRap 3D printer on the main stage. The printer is over a decade old but spent a few years in a box. Actually I've been working on it for about 8 years now but I hope it will be done in the next 2 years...
I should document all this in detail but I don't really have time. For now you can take a look at the slides to see a history of my printer.
Serious Business STM32 Development
Last updated: 03 Jul 2024 - 22:20
Overview
This blog post is meant to cover a bunch of different things about developing large, complex and sophisticated but highly reliable applications on STM32 microcontrollers. Lots of the stuff I'm writing about will have applications on other embedded systems which use FreeRTOS but I'm sticking to the ecosystem I know best. I've done this stuff several times over for various employers over the last decade but it's all locked away in private repositories and each time I feel like I'm reinventing the wheel so I'm going to try and build it all up from scratch on my own time without reference to any proprietary code.
The code I'm writing in this post will all be run on an STM32F429I-DISC1. This board is getting on a bit now but it's still available pretty cheaply and it has an external SDRAM adding 8MB of memory to the system which adds a bit more flexibility and extra requirements for memory segmentation.
DIY hand-held games console: Faster GUI
Last updated: 19 Apr 2023 - 22:19
It's been a while since I got anything done on the Noodle Game console, but I found it on my desk and had a few minutes to spare so thought I'd have a crack at upgrading the screen driver code. It was a little bit of a disappointing exercise but at least I've learned some things.
Stuck in 24 bit
The screen supposedly supports a bunch of different colour depths including 18 bit (6 bits of each colour) note that this isn't a nice multiple of 8, a 16 bit mode where green has 6 bits but red and blue only 5 and apparently even a 3 bit mode where it has just one bit per colour like a Sinclair Spectrum. Unfortunately in SPI mode it only supports either the 8 bit or the full 18 bit modes. In 18 bit mode the colours are padded to a full byte each and so need three bytes per pixel.
Slow clock
The screen module I've got is hard-wired to SPI mode. The module can do parallel RGB, host bus or even MIPI-DSI apparently all of which offer faster data transfers and a choice of colo
Surface Tension
Last updated: 19 Apr 2023 - 21:43
Just less than a year ago I decided it would be interesting to try out a Microsoft Surface as an alternative to an Android tablet and maybe more portable than my venerable ThinkPad T430. I got a cheap unit from eBay to try it out, it's a Surface Pro 5 so pretty old now. Of course I didn't want to use Windows on it and I was thrilled with how easy getting a nice Linux install was on this very Microsoft hardware. I didn't do anything particularly special to get it running, just followed the instructions on GitHub.
For the most part my experience with the platform was good. Performance was pretty good. The pen and touch screen worked pretty well. I used it for coding, PCB layout, lots of FreeCAD work and even a bit of gaming via Steam. I only had 8GB of RAM which would probably have been okay but the ultra high definition display meant that apps were taking a lot more RAM than I'd expected and it very easily ran out of memory.
Debugging STM32 Inside VSCode
Last updated: 24 Oct 2022 - 20:47
In my current series on building my own handheld games console I've been developing for the STM32 inside VSCode. It's a reasonably comfortable IDE that works well on Linux and there's the STM32-for-VSCode extension.
That extension aims to automate everything for you but as usual with embedded development not everything is quite that joined up...
DIY hand-held games console: GUI Framework
Last updated: 22 Oct 2022 - 23:00
Now that the screen lights up and displays something, next on my list was a way to make the screen show useful things dynamically with as little code as possible. I decided to go with LVGL which is a framework for creating embedded GUIs on small graphical displays. It's implemented in C and is impressively flexible whilst leaving the programming interface familiar to anyone who's used Qt, GTK etc.
DIY hand-held games console: Screen Driver
Last updated: 13 Jul 2022 - 22:40
Now that the toolchain and the basics are working, the next thing to do is to start getting some of the peripherals working. I like to do this one at a time and it's usually best to start with the outputs first, that way you can use the outputs to test whether the inputs are working. We've proven the basic UART comms already, so the next big output device is the screen. The screen I've got came from eBay but appears to match up with this entry on LCD Wiki.
DIY hand-held games console: Hello World
Last updated: 02 Jul 2022 - 23:53
I've got a collection of parts on hand left over from various projects or bought for projects that never started, so I'm going to try and build a system as a prototype. The core of the system is the STM32F429 which I have on a "Discovery board". The one I'm using is the original production run STM32F429I-DISCO board which has long since been replaced by the STM32F429I-DISC1 board. As far as I can see the only real difference between these is a newer ST-Link which supports virtual serial port as well as SWD/JTAG programming. While more convenient all I need for the old board is an extra serial to USB adapter which I have anyway.