Introducing my Tali’s Mask from Mass Effect Project. Prototype voice reactive led light

Hey Guys whats up! I just want to introduce one of my many projects. Below you will find my youtube video showing the prototype of the voice reactive LED light. I will get started 3D modeling the mouth piece soon. Also it is nice to find great references of Tali’s mask previously created by cosplayers. You can check out their mask here marugitto cosplay’s Mask.


Youtube Video



List of Components


Adafruit (PID 659) FLORA – Wearable electronic platform: Arduino-compatible – v3

Adafruit (PID 1260) Flora RGB Smart NeoPixel version 2 – Pack of 4

Adafruit Electret Microphone Amplifier with Adjustable Gain

uxcell Black 2 x AAA Batteries Battery Holder Case Container w On/Off Switch

Battery Packs Lithium Ion Battery 3.7v 2000mAh


Code


#include
#include
#ifdef __AVR__
#include <avr/power.h>
#endif

#define PIN 6
#define NUMPIXELS 1

//==============Defining variables for fix_fft=======================
int x = 0;
char im[128], data[128];
char data_avgs[14];
int i = 0, val, steady;
int l = 0;

Adafruit_NeoPixel pixel = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
Serial.begin(9600);
pixel.begin();
pixel.show();
}

void loop()
{
//===================FFT algorithm=======================
for (i = 0; i < 128; i++)
{
val = analogRead(A9);
steady = val;
data[i] = val;
im[i] = 0;
}

fix_fft(data, im, 7, 0);

for (i = 0; i < 64; i++)
{
data[i] = sqrt(data[i] * data[i] + im[i] * im[i]);
}

for (i = 0; i < 14; i++)
{
data_avgs[i] = data[i * 4] + data[i * 4 + 1] + data[i * 4 + 2] + data[i * 4 + 3];
data_avgs[i] = map(data_avgs[i], 0, 30, 0, 9);
}
int value = data_avgs[0];
Serial.print(“Time domain: “);
Serial.println(steady);
Serial.print(“Frequency domain: “);
Serial.println(value);
delay(100);
pixel.setPixelColor(0, 75, 0, 130); //change color here by changing RGB values. In this case R=150, G=150, B=150
int bValue = map(value, 0, 30, 0, 255);
pixel.setBrightness(bValue);
pixel.show();
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s