![]() #if defined (led_matrix_40) //settings for a 40 led matrix ![]() Int reverseShowPeaks = true // reverses the on/off setting in case you made a wiring mistake - ) selectButton1Pin = 8 // push button for changing settings on digital pin 8 int useSelectButton1 = true // set to false if no push button1 for selecting the color scheme is connected selectButton2Pin = 9 // push button for changing settings on digital pin 9 int useSelectButton2 = true // set to false if no push button2 is connected setup variables for the number of leds and led strip or 2 rings Int leftPin = A0, rightPin = A1 // left audio in on analog 0, right on analog 1 int brightnessPin = A4, sensitivityPin = A5 // potentiometers for brightness and sensitivity on analog 4 and 5 int leftStripPin = 5 // DIN of left led strip on digital pin 5 int rightStripPin = 6 // DIN of right led strip on digital pin 6 int showPeaksPin = 7 // switch to toggle peaks on or off on digital pin 7 ( 7, 9 for box version ) int showPeaksMomentarySwitch = false // set false for an on/off toggle switch - set to false if not using potentiometersĬonst int useSensorValues = true // setup pins This setting has to be set right or the script will not work correctly: important setting: using potentiometer sensor values or not #define led_rhombus_160_ps //#define led_strip_60 uncomment the definition for the connected strip or ring (s ) led_matrix_40 #define highLevelInput // define for high level inputs uncomment when using high level (non-consumer ) inputs #define compressOverflowNumOfTimes 2 // num of times to apply the compressOverflowFactor #define compressOverflowPeaks // compress overflow peaks or not #define displayOverflow // display overflow or not #define nonLinearSinAudio // uncomment to map the linear audio input signal to a non-linear, reverse audio-taper response (sin wave ) //#define nonLinearReverseSinAudio // uncomment to map the linear audio input signal to a non-linear, audio-taper response (reverse sin wave ) #define nonLinearLogAudio // uncomment to map the linear audio input signal to a log response //#define nonLinearAvr2 // uncomment to average the original input with the non-linear response ![]() uncomment to map the linear audio input to non-linear response #define averageNumOfReadings 3 // num of readings for averaging #define averageReadings // average input levels or not increasing the value will make the script less responsive uncomment to average the input levels to the number defined by averageNumOfReadings. #define DEBUG_PEAKS // debug: display peaks, ignoring other settings #define DEBUG_NO_PEAKS // debug: display no peaks, ignoring other settings #define DEBUG_PRINT_ANALOGVALUES // debug: serial.print analog input values #define DEBUG_PRINT_LOOP_TIME // debug: serial.print the looptime in ms #define DEBUG_NO_PEAK_SWITCH // debug: no peak switch connected DEBUG_TEST_LEDS // debug: display each led (color ) slowly at startup #define DEBUG // debug: enable serial.print * This code is free for personal use, not for commercial purposes. * Notice: search for in the Sketch for important variables to set * for the Sketch to work with your setup. * Designed to be used with an Arduino UNO, Nano or compatible device. ![]() * Stereo VU Meter for 1 or 2 LED rings or strips build by ericBcreator Update January 2018: check the new Facebook group over here: Note : click the 'Download' button and not the 'Copy' or the code may be truncated and not work correctly! You need the Adafruit_NeoPixel library for the script to work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |