--- title: 'My First Real Project: LEDs Driven by an FFT' description: A Raspberry Pi music player that drove RGB strips through MOSFETs. The first thing I started and actually finished. date: 2026-04-26 period: 'Spring 2016' thumbnail: src: ./_assets/leds.jpg alt: RGB LED strips lit by a music synchronisation project. article: tags: ['systems', 'tools'] stack: ['Python', 'NumPy', 'FFT', 'Raspberry Pi', 'MOSFETs', 'vanilla web'] project: title: Lights Synchronized to Music --- Spring 2016. I had a Raspberry Pi, a couple of 12V RGB LED strips someone had given me, a handful of MOSFETs from an electronics kit, and no idea what I was doing. I wired one of the MOSFETs backwards and it got hot enough to leave a small mark on the breadboard, which is how I learned, slowly and because I had to, to read a datasheet. This was the first thing I ever started and actually finished. The plan was roughly: play music, look at it somehow, make the lights match. My first attempt mapped raw audio amplitude to brightness, which makes the lights pulse at everything (clipping, voices, fan noise): a strobing mess that hurt to watch. I read about Fourier transforms just long enough to type `numpy.fft.fft(audio_chunk)` into a REPL, and that was the moment the project started behaving like the thing I'd imagined. Bass-heavy bins went to red, mids to green, highs to blue, and smoothing the output over a few frames killed the flicker. The frontend was a vanilla web page served from the same Pi: pick a track, drag a few threshold sliders, watch the room change. A `