Coder Social home page Coder Social logo

ahmadsum1 / arduino-acoustic-control-for-rgb-led-strip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brainsmash/arduino-acoustic-control-for-rgb-led-strip

0.0 1.0 0.0 24 KB

Acoustic Control for RGB LED Strips in Arduino using a Sound sensor and a RGB Led strip that changes color with the frequency of the sound, music is used as an example

License: GNU General Public License v3.0

C++ 100.00%

arduino-acoustic-control-for-rgb-led-strip's Introduction

Arduino-Acoustic-Control-for-RGB-LED-Strip

Acoustic Control for RGB LED Strips in Arduino using a Sound sensor and a RGB Led strip that changes color with the frequency of the sound, music is used as an example

******** BRAIN SMASH ********

****** AUTHOR: DAEDALUS 7/2019 ******

**** Github.com/BrainSmash ****

You may use or modify this code for any and all of your projects whitout any restrictions If you use any fragment of this code we will be happy if you could send a message ;) Brain Smash nor the Author are hold responsible for any misuse partially or complete of this code

Acoustic Control for RGB LED Strips

How to build your own Music Visualizer with Arduino for RGB LED Strips This is a video that teaches you how to change the color of a LED strip based on the value that is obtianed from a Sound sensor, the signal is filtered using a First Order Low pass IIR Digital filter with a cutoff frequency of 900Hz the filtered signal is compared with several threshold values that are used to determine which color will be displyed based on the frequency of the sound that is sensed by the sensor, low frequency sounds (barely audible) are displayed as Blue in the LED Strip, all the way to high frequency sounds (highly audible) wich are displayed as Red in the strip.

MainFunction()

This method read the value of the output of the Sound sensor with "sensorValue" as a float & substracts 1023 to it since the sound sensor gives an output of 1023 or 5V when is not sensing any sound, this way we have a value of 0 when not sensing sound
& values up to 1023 when it senses sound (vibrations in air), we convert the signal to volts.

FilterSignal()

Filter the signal using a First Order IIR Low Pass Digital Filter created in Matlab and assigned the value to the variable "filteredSignal"

CompareSignalFiltered()

Compare the "filteredSignal" variable with "filteredSignalValues" array to determine where our compared variable value is less, more or in between, our treshold values to assign a color to the LED Strip and print the color that represents what we set.

RGBColor()

Send to the defined pins for each RGB color a value from 0 to 255 that represent the color that we want; Search on Google RGB Color Wheel to help you learn how colors are created.

arduino-acoustic-control-for-rgb-led-strip's People

Contributors

brainsmash avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.