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.

  • 8,026 views
  • 3 comments
  • 24 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

  • 4,916 views
  • 2 comments
  • 35 respects

32-Band Audio Spectrum Visualizer Analyzer

Project showcase by Shajeeb

  • 29,846 views
  • 77 comments
  • 153 respects

2 x 16-Band Audio Spectrum Analyzer with LCD

by Shajeeb and ThomAce

  • 1,538 views
  • 0 comments
  • 8 respects

Arduino UNO Guitar Pedal

Project tutorial by electrosmash

  • 58,348 views
  • 29 comments
  • 173 respects

Turn an Arduino Uno into a MIDI Controller: Guitar Pedals

Project tutorial by Johan van Vugt

  • 5,541 views
  • 1 comment
  • 11 respects

4x4x4 LED cube with Arduino Uno and 1sheeld

Project tutorial by Hassan Ibrahim

  • 34,276 views
  • 7 comments
  • 64 respects
Add projectSign up / Login