Developing an LED Christmas tree

We are now familiar with the concept of sound visualization. We have also learnt about controlling an LED matrix with music. Now, we will develop an LED Christmas tree, which will blink the LEDs as per the music beats.

To develop the basic circuit which responds to the beats, connect the circuit as shown in the following image:

Developing an LED Christmas tree

We will connect the audio input/mic to the analog pin 3 of the Arduino. We have connected LEDs to pins 5 to 12.

Once you have connected the circuit as mentioned, upload the following code on the Arduino:

#include <fix_fft.h> int LEDPins[] = {5, 6, 7, 8, 9, 10, 11, 12}; int x = 0; char imaginary[128], ...

Get Arduino: Building exciting LED based projects and espionage devices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.