Skip to content

An Arduino based music visualizer using the FastLED library and a strip of individually addressable LEDs

Notifications You must be signed in to change notification settings

justcallmekoko/Arduino-FastLED-Music-Visualizer

Repository files navigation

Arduino FastLED Music Visualizer


Instagram - YouTube - Website

Like my content? Show your support by subscribing to my channel and following my page.

Catch my live stream on Twitch where I play games, have just chatting sessions to talk tech, and just generally be an ordinary person who can't figure out how to make proper life decisions.

Stream Schedule:
Mon: 1800 - 2000 EST
Wed: 1800 - 2000 EST
Sun: 1200 - 1400 EST

Table Of Constituents

Intro

An Arduino based music visualizer using the FastLED library and a strip of individually addressable LEDs.
Imagine this scenario. Does this not make you want to create your own music visualizer?

> crawled inside of the neighbor's dog
> dog walks inside of neighbor house
> broke into neighbor house by being inside of dog
> it is night now
> brown cow
> creep upstairs to find their mushroom farm
> go into bed room
> nothing
> turn to leave
> emergency yogurt falls out of pocket onto hardwood floor of bedroom
> yogurt everywhere
> wife gets up
> slips on yogurt
> impaled by mattress and is dead
> yogurt murder
> heinous Crims
> power dump on dad's face so he doesn't feel as bad about his dead yogurt wife
> poop yogurt and leave
> poo and yogurt all over
> in the air
> zero gravity and poop

I can't find a guide worth a shit on YouTube or Github. I saw many videos showing a demo of a DIY music visualizer using these exact lights and an arduino. People seem to love to brag about how awesome their shit is but they won't show you how to make it. I have created this repo for anyone who faces the same challenge I did. I hope you find this useful and beneficial to your daily intake of fiber.

Setup

So this is how to setup the most "dank" music visualizer ever.
There will be two ways to set this puppy up. I prefer the second way, but that costs money. There is a full video tutorial here

Materials

Standalone Arduino UNO Setup

Code

  1. Open this code in your Arduino editor
  2. Line 13, adjust NUM_LEDS to the number of LEDs you plan to use
  3. Upload to your Arduino UNO

Pins

  • 5v - Connect to Vcc on LED strip
  • GND - Connect to GND on LED strip
  • A0 - Connect to the other end of the 3.5mm jack connected to your music source
    • A0 must be pulled down with a resistor (shown in the picture below)
  • 6 - Connect to DATA on LED strip alt text

Arduino UNO with Sparkfun Spectrum Shield Setup

For this version of the music visualizer, you will need the Sparkfun Spectrum Shield
I prefer this version because it allows you to split the audio signal into 7 seperate channels (bass, mids, treb). This is important for anyone who wants their music visualizer to respond only to bass like mine.

Code

  1. Open this code in your Arduino IDE
  2. Line 15, adjust NUM_LEDS to the number of LEDs you plan to use
  3. Install the FastLED library under "Manage Libraries"
  4. Upload to your Arduino UNO

Pins

  • 5v - Connect to Vcc on LED strip
  • GND - Connect to GND on LED strip
  • 6 - Connect to DATA on LED strip