Project showcase
Spectrum Analyzer Using Winamp and Arduino Uno

Spectrum Analyzer Using Winamp and Arduino Uno © GPL3+

Driving a dot matrix display with Arduino using data from a Winamp plugin.

  • 13,639 views
  • 5 comments
  • 34 respects

Components and supplies

Apps and online services

About this project

I built a giant spectrum analyzer using Winamp.

Here is YouTube video:

SPECTRUMN ANALYZER

Download the Winamp plugin here

And here is the Arduino code:

#include <SPI.h>
#include <DMD.h>
#include <TimerOne.h>
#define DISPLAYS_ACROSS 3
#define DISPLAYS_DOWN 1
byte count=0;
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
int column, row,i,j;
void ScanDMD()
{ 
dmd.scanDisplayBySPI();
}
byte serial_getch() {
while (Serial.available() == 0);
return Serial.read();
}
void setup(void)
{
Serial.begin(19200);
Timer1.initialize( 5100 ); 
Timer1.pwm(PIN_DMD_nOE, 10); // to setup PWM and the starting brightness
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );
}
void loop(void)
{ 
byte rxbyte = serial_getch();
if (rxbyte == 'j')
{
byte column = serial_getch()-48;// column: 1,2,3,.. 16
byte row = serial_getch()-48;   // row: 1 or 2
byte data = serial_getch()-97;// level: 1 - 8
drawLevel(column, row,data);
}
else if (rxbyte == 'i')
{
byte column = serial_getch()-48;// column: 1 a 16
byte row = serial_getch()-48;   // row: 1 or 2
dmd.drawChar( column, row*8, serial_getch(), GRAPHICS_NORMAL);//draw a empy space
}
else if (rxbyte == 'k')
{
dmd.clearScreen( true ); //clear all
}
}
void drawLevel(byte column,byte row,byte data){
if (row==1){  
for (int i=0; i<=data; i++){
dmd.drawLine(column*6,i,column*6+4,i,GRAPHICS_NORMAL);
}
for (int i=0; i<=data; i++){
dmd.drawLine(column*6,i+data,column*6+4,i+data,GRAPHICS_INVERSE);
}
}
else{
for (int i=7; i<=data+7; i++){
dmd.drawLine(column*6,i,column*6+4,i,GRAPHICS_NORMAL);}
for (int i=8; i<=data+8; i++){
dmd.drawLine(column*6,i+data,column*6+4,i+data,GRAPHICS_INVERSE);
}  
}
}

For more info: dinoelectro@blogspot.com

Comments

Similar projects you might like

Spectrum Analyzer with RGB LEDs

Project showcase by HeinzKetschup

  • 22,300 views
  • 13 comments
  • 43 respects

32-Band Audio Spectrum Visualizer Analyzer

Project showcase by shajeeb

  • 119,165 views
  • 168 comments
  • 257 respects

2 x 16-Band Audio Spectrum Analyzer with LCD

by shajeeb and ThomAce

  • 11,888 views
  • 3 comments
  • 12 respects

Super-Simple Music Spectrum Visualizer

Project tutorial by Alex Wulff

  • 9,316 views
  • 4 comments
  • 9 respects

Arduino UNO Guitar Pedal

Project tutorial by electrosmash

  • 88,751 views
  • 32 comments
  • 239 respects

Stereo NeoPixel Ring VU Meter

Project showcase by ericBcreator

  • 115,915 views
  • 373 comments
  • 206 respects
Add projectSign up / Login