Project tutorial
Audio Blink

Audio Blink © GPL3+

This lessons aims to show how to make an Audio Blink.

  • 3 respects

Components and supplies

About this project

1. Schematic

As you can see from the schematic there are two macro-blocks: the audio block and the LEDs block.

The audio block is composed by an operational amplifier (LM358) used to amplify of a factor A = 1M/100k = 10, the signal provided from the microphone and the MSGEQ7. The MSGEQ7 samples the output signal of the amplifier and sends an analog value, proportional to the presence of each frequency in each band, to the Arduino's A0 input.

The LEDs are linked in series: the DOUT of the previous LED is attached to the DIN of the next. All the 5V and the GND are linked in parallel. The LEDs are driven by the Arduino's pin 3 using the Adafruit Neo Pixel Libary.

2. How it works

In this example only two values of the seven provided by the MSEQ7 are used. In particular those corresponding to the bands 400Hz and 1 kHz. In base of the analogRead() of these two values, the LEDs will blink more or less brightly and more or less from blue to red (blue + red = purple)! The eye effect is very nice!

3. Code

First of all we need to read the analog values coming out from the MSGEQ7. This can be done using the function readMSGEQ7() which generates step signals and reads the corresponding analog value according to the datasheet of the component.

After this, we can simply use the values to modify the color of the LEDs using the function colorWipe!

4. Mounting

You can make this project on a breadboard or on a perfboard (as we did) and put it in a very cool box!

5. Box

We decided to make a wood box for this project. It can be found in the attachments of the lesson. Laser-cut it!


Code snippet #1Arduino
/*Arduino Audio Blink
The WS2812 LEDs will blink in base of your voice! Try it and have fun!
Author: Arturo Guadalupi <>*/
#include <Adafruit_NeoPixel.h>
const int msg7RESET = 2;
const int msg7Strobe = 4;
const int msg7DCout = A0;
const int PIN = 3;
const int NUMPIXELS = 15; //number of LEDs
int spectrumRead[7] = {0}; //variable uded to store the analog values from the MSGEQ7
int i; //variable used as index in the sketch
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
  strip.begin();; // Initialize all pixels to 'off'
  //Pins used to drive the MSGEQ7
  pinMode(msg7RESET, OUTPUT);
  pinMode(msg7Strobe, OUTPUT);
void loop() {
  readMSGEQ7(); //read bands value
  //                    R                                      G  B   DELAY
  colorWipe(strip.Color(map(spectrumRead[2], 0, 1023, 0, 100), 0, 0), map(spectrumRead[2], 0, 1023, 0, 3));
  //                    R  G  B                                       DELAY
  colorWipe(strip.Color(0, 0, map(spectrumRead[3], 0, 1023, 0, 100)), map(spectrumRead[3], 0, 1023, 0, 3));
//Code used to get the analog values from the MSGEQ7. See datasheet for further informations
void readMSGEQ7()
  digitalWrite(msg7RESET, HIGH); // reset the MSGEQ7's counter
  digitalWrite(msg7RESET, LOW);
  for (i = 0; i < 7; i++) {
    digitalWrite(msg7Strobe, LOW); // output each DC value for each freq band
    delayMicroseconds(35); // to allow the output to settle
    spectrumRead[i] = analogRead(msg7DCout);
    digitalWrite(msg7Strobe, HIGH);
// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for (uint16_t i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);;


Schematic #1
750x750 5423d721b05135 5avlz1yboe


Similar projects you might like

32-Band Audio Spectrum Visualizer Analyzer

Project showcase by shajeeb

  • 256 respects

RGB 32-Band Audio Spectrum Visualizer

Project tutorial by janux

  • 9 respects

FHT Audio Spectrum Visualizer

Project tutorial by janux

  • 11 respects

VU Meter for Audio Signal (dBu) using LCD

Project tutorial by deltakilo

  • 5 respects

echoTrek - Digital Delay / Echo - Audio Effects with Arduino

Project in progress by CesarSound

  • 23 respects

Arduino Audio Reactive Desk Light

Project tutorial by Haziq Azri

  • 54 respects
Add projectSign up / Login