Intel Edison: VU-meter

This is how to make a simple VU-Meter with Intel Edison or any Arduino board.

Discover the music in visual form. Let's begin...

Mobile users can find the video included from HERE!

Step 1: Components

Intel Edison: VU-meter
Intel Edison: VU-meter

Basic components needed are LCD screen, Microphone and Arduino based board.

Optional is the shield that i will be using.

Connect the components to the board and start coding.

Step 2: Coding

Intel Edison: VU-meter

Coding this kind of project can be a challenge. And i have been inspired by many same kind of project's.

First of all we should include library's and global variables for the components.

Also in here are the blocks that will be moving when sound level rises.

#include "rgb_lcd.h"

rgb_lcd lcd;

const int colorR = 255; const int colorG = 0; const int colorB = 255;

#define MIC 0

int colors;

#define T_REFRESH 100 // Refresh rate #define T_PEAKHOLD 4*T_REFRESH // Hold the peak

byte fill[6]={ 0x20,0x00,0x01,0x02,0x03,0xFF }; byte peak[7]={ 0x20,0x00,0x04,0x05,0x06,0x07,0x20 }; int lmax[2]; int dly[2]; byte block[8][8]= { { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10 }, // character to fill the bar { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 }, { 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C }, { 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E },

{ 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08 }, // character to peak level { 0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04 }, { 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 }, { 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 }, };

Then is time for setup.

I have included a small intro in here that will go through colors of the screen for a few seconds. Just for fun.

void setup ( void )
{ lcd.begin( 16,2 ); for( int i=0 ; i

lcd.setRGB(250, 40, 0); // Orange delay(1000);

lcd.setRGB(255, 0, 0); // Red delay(1000);

lcd.setRGB(10, 10, 255); // Blue delay(1000);

lcd.setRGB(255, 255, 255); // white delay(1000);

lcd.setRGB(200, 0, 255); // Purple delay(1000);

lcd.setRGB(0, 255, 0); // Green delay(1000);

lcd.setRGB(255, 0, 100); // pink delay(1000); }

long lastT=0;

Then is time for loop that will go on and on forever.

void loop ()
{ if( millis()

bar( 0,anL ); lcd.setCursor(0,1); lcd.write("Beat this"); lcd.setCursor(10,1); lcd.write(0b11001101); lcd.write(0b01001111); lcd.write(0b01011111); lcd.write(0b01101111); lcd.write(0b00101111);


This is the important bit of the subroutine. This is the main thing that will define the sound bar on the screen.

void bar ( int row,int lev )
{ lcd.setCursor( 0,row ); lcd.write( row ? : 'B' ); for( int i=1 ; ilmax[row] ) { lmax[row] = lev; dly[row] = -(T_PEAKHOLD)/T_REFRESH; } else { if( dly[row]>0 ) lmax[row] -= dly[row];

if( lmax[row]

Intel Edison: VU-meter
VU_meter.ino2 KB

Step 3: Test it and fine tune if needed.

Intel Edison: VU-meter
Intel Edison: VU-meter
Intel Edison: VU-meter
Intel Edison: VU-meter
Intel Edison: VU-meter

Testing is a important part of the coding.

It should work right out of the box but who knows for sure.

If you need any assistance just ask!

Step 4: Done.

Intel Edison: VU-meter
Intel Edison: VU-meter

Blast off yer speakers for this but remember that neighbors may not think that this project is a good idea.

Anyway thanks for reading and i hope that you will follow me for more awesome projects.

Happy building's!


Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel