My First Real Project: LEDs Driven by an FFT
A Raspberry Pi music player that drove RGB LED strips through MOSFETs.
This was my first 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 PWM. 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 FFT3. 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 Ajax and XMLHttpRequest, became fascinated by CSS, and discovered that programming feels like real-life magic. I wish more kids had that first impression of programming: the kind that makes them curious to build things and doesn’t punish harshly for making mistakes along the way.
- ATtiny85 handheld: https://schmelczer.dev/articles/ad-astra-attiny85-game-engine/↩
- Raspberry Pi 1 Model A: https://en.wikipedia.org/wiki/Raspberry_Pi↩
- an article on the FFT: https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/↩