Tali's Mask - LED Sound Reactive

Tali's Mask - LED Sound Reactive

thingiverse

Sound Reactive Mask Code: Here's the Code and a YouTube Video Demonstrating It. If Enough People Show Interest, I'll Create the Mask for Tali Cosplayers. Code: #include <fix_fft.h> #include <Adafruit_NeoPixel.h> #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(); }

Download Model from thingiverse

With this file you will be able to print Tali's Mask - LED Sound Reactive with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Tali's Mask - LED Sound Reactive.