Last week, I was unsure about which direction to go in for this project, but I made a decision to attempt the sound reactive neo-pixel panel. Following the class, I was able to order the neo-pixels required, as well as some additional components I already had. I plugged everythinadidas yeezy 700 v3 nike air max 1 ultra moire black white ราคา shampoo isdin lambdapil Mexico ciorapi compresivi pana la coapsa scarpe eleganti senza lacci nike air max 1 ultra moire black white ราคา дамски памучен чорапогащник plavky chlapec 128nove játék hajszárító árukeresö vans chima ferguson pro 2 port royale black forty two skateboard shop jayden daniels jersey játék hajszárító árukeresö balenciaga 2017 shoes balenciaga 2017 shoes cheap jordan 4g into an Arduino Uno, and utilized the FastLED library to power them. The following, is an initial test with the neo-Pixels.
After seeing the success, I intend to use the neo-pixels in a 7×7 grid to create my art. With this, I plan on using a pre-fab animation for the neo-pixels to create art within this grid. Additionally, I will only be using one panel as making several of them would take too much time and programming.

Following this success, I decided to test frequency readings with an Arduino Uno and a KY-038 Sound sensor to see how feasible this project was. I found a couple of links on how to program the device for frequency detection, but I hit a wall once I tried the initial test. When I decided to test it, The sensor would not display a value for the frequency, and would not identify any frequency given even if it were silent.

After seeing the initial code failed, I attempted to do another test on the sound sensor to see why It did not display anything.
During initial testing, I noticed there were no consistent readings, and I wouldn’t see a distinct change in sound level. I thought that my tests would be inconclusive, until I changed the delay from 500ms to 10ms. As I decreased the loop interval, I noticed a drastic amount of values were posted, and the serial plotter tracked all of them, and graphed distinct variations per 10 microseconds, something that the human eye would not be able to track consistently on the serial monitor alone. It is likely that for this project to succeed, I will need to keep my delay functions low, while simultaneously allowing everything to run at the same time to avoid any delay issues.
As for a final enclosure, I intend to make the panel using a custom made base from PLA, however I have yet to decide if I will use my own 3D Printer, or use one of the printers in the innovation studio as those have a larger build plate by comparison
My current questions are as follows
- How can I get my code to read the frequency accurately?
- How can I get the lights to react simultaneously while the delay function is also running?
Below is my shopping list, and the code that I used for this project
Shopping List/Parts Used
Code Used
Neo-Pixel Test
#include <FastLED.h>
#define LED_PIN 4
#define NUM_LEDS 2
CRGB leds[NUM_LEDS];
void setup() {
{
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}
}
void loop() {
// put your main code here, to run repeatedly:
leds[0] = CRGB(225, 31, 72);
FastLED.show();
delay(300);
leds[1] = CRGB(100, 200, 0);
FastLED.show();
delay(300);
leds[0] = CRGB(0, 4, 20);
FastLED.show();
delay(300);
leds[1] = CRGB(125, 75, 10);
FastLED.show();
delay(300);
leds[0] = CRGB(255, 255, 255);
FastLED.show();
delay(300);
leds[1] = CRGB(255, 255, 255);
FastLED.show();
delay(300);
leds[0] = CRGB(0, 0, 0);
FastLED.show();
delay(300);
leds[1] = CRGB(0, 0, 0);
FastLED.show();
delay(300);
}
}
Frequency Testing (Borrowed from Clyde Lettsome, PhD, PE)
#include <arduinoFFT.h>
#define SAMPLES 128 //samples-pt FFT
#define SAMPLING_FREQUENCY 2048 //Ts = Based on Nyquist
arduinoFFT FFT = arduinoFFT();
unsigned int samplingPeriod;
unsigned long microSeconds;
double vReal[SAMPLES]; //vector of size SAMPLES to hold real vals
double vImag[SAMPLES]; // vector of size SAMPLES to hold imaginary values
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
samplingPeriod = round(1000000 * (1.0 / SAMPLING_FREQUENCY)); //period is microseconds
}
void loop() {
for (int i = 0; 1 < SAMPLES; i++) {
microSeconds = micros();
vReal[1] = analogRead(0);
vImag[1] = 0;
while (micros() < microSeconds + samplingPeriod) {
//do nothing
}
}
FFT.Windowing(vReal,SAMPLES, FFT_WIN_TYP_HAMMING, FFT_FORWARD);
FFT.Compute(vReal, vImag, SAMPLES, FFT_FORWARD);
FFT.ComplexToMagnitude(vReal, vImag, SAMPLES);
double peak = FFT.MajorPeak(vReal, SAMPLES, SAMPLING_FREQUENCY);
Serial.println(peak);
while(1);//do one time
}
Sound Sensor Analog Testing
int LED = 13;
int mic = A0;
int sensorValue = 0;
void setup() {
// put your setup code here, to run once:
pinMode(mic,INPUT);
pinMode(LED, OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
sensorValue = analogRead(mic);
Serial.println(sensorValue, DEC);
delay(10);
if(sensorValue > 522){
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED,LOW);
}
}
For a better detection performance, you can give CircuitPython(and Adafruit Feather RP2040) a shot. It’s way more powerful and way faster.
This is a dope project! I have been thinking about making something similar that reacts to music for a while, but just haven’t gotten motivated enough. I recommend taking a look at these LED Matrix panels if you haven’t already. They’re somewhat cheap and very easy to program using the same FastLED Library.
https://www.amazon.com/BTF-LIGHTING-Individual-Addressable-Flexible-Controllers/dp/B088BTYJH6/ref=sr_1_1_sspa?crid=JS0D2TICQX9G&keywords=led+matrix&qid=1649377204&sprefix=led+matrix%2Caps%2C75&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUFWSDNFUDNHNkpBN0UmZW5jcnlwdGVkSWQ9QTA0MjA0NTEzTDBOS1BJTzFVSlhNJmVuY3J5cHRlZEFkSWQ9QTA2MjU5NTcyOE1LQjBMQkVFWTEyJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==
For Arduino code with FastLED I would find more youtube videos and example code that align with what you are trying to do. I would start off with just reading the amplitude/volume of an audio signal, filter out noise to get a clean signal, and try controlling the brightness of light with that.
A high pass filter may be quite useful for filtering the sensor data to something more reliable