My First Full-Stack Project: LEDs Driven by an FFT

A Raspberry Pi music player that drove RGB LED strips.

RGB LED strips lit by a music synchronisation project.

This was my first real project and the one that paved the way for the ATtiny85 handheld1 four years later.

When I bought my first Raspberry Pi, a Raspberry Pi 1 Model A2, I had no idea what I was doing. Trying to drive a 12 V RGB LED strip burnt me both figuratively and literally, but it taught me how to wire MOSFETs and control them with PWM3. The obvious next step was to make the strip do something. I’d seen LEDs react to music and then stumbled across an article on the FFT4. The article was thoroughly arcane to me, but it gave me the last building block I needed.

Without quite meaning to, I’d built a full-stack application. I learnt about Ajax5 and XMLHttpRequest6, became fascinated by CSS, and discovered that programming can feel like real-life magic. I wish more kids had that first experience of programming: one that makes you curious to build things and doesn’t punish you too harshly for making mistakes along the way.

  1. ATtiny85 handheld: https://schmelczer.dev/articles/ad-astra-attiny85-game-engine/
  2. Raspberry Pi 1 Model A: https://raspi.tv/2013/raspberry-pi-model-a-first-impressions-and-photos
  3. PWM: https://raspi.tv/2013/rpi-gpio-0-5-2a-now-has-software-pwm-how-to-use-it
  4. an article on the FFT: https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
  5. Ajax: https://developer.mozilla.org/en-US/docs/Glossary/AJAX
  6. XMLHttpRequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

Searches titles, descriptions, and the full text of every article.

    to move to open Esc to close