Team 8 Audio Visualizer Code

Team 8 Utilized the help of an external library as well as created functions in their own. The external library we utilized was known as FAST LED, and allowed us to easily push colors out to the LED strip quickly. Team 8 focused on building functions that mapped an input from a microphone then addressed and lit up the WS2182B LED strip.

This diagram features a general overview of the code team 8 used to create this project. After the baud rate was set the code would evaluate where a counter variable D was. This counter variable was used in place of a frequency dependence due to a lack of our current microphone to reliably produce a distinct clear difference in frequency.

The following code is an example of one of the functions Team 8 wrote and placed into a custom library. We used an Led matrix to assign individual values to each pixel of the WS2182B LED Strip. As can be shown from this function, the input from the Sparkfun soundboard is read by the Arduino through analog port 0. That value is then mapped onto a value from 0 to 9, because our led matrix had 4 rows and 9 columns per side. Once that mapping was complete the program would assign values to the LEDs through a for loop, starting with the first row and column of each matrix. Finally, once that process was complete the LEDs would be cleared and the remapped values would be calculated again. This is one example of the 5 functions team 8 derived over the course of this final project.