#ifndef ONESINE_H #define ONESINE_H void onesine() { // Persistent local variable. static int thisphase = 0; // Phase change value gets calculated. // Local variables. Play around with these. uint8_t allfreq = 32; // You can change the frequency, thus distance between bars. Wouldn't recommend changing on the fly. uint8_t thiscutoff = 192; // You can change the cutoff value to display this wave. Lower value = longer wave. uint8_t bgclr = 0; // A rotating background colour. uint8_t bgbright = 10; // Brightness of background colour. uint8_t colorIndex; timeval = 30; // Our EVERY_N_MILLIS_I timer value. thiscutoff = beatsin8(12,64, 224); thisphase += sampleavg/2; // Move the sine waves along as a function of sound. colorIndex = millis() >> 4; // millis() can be used for so many things. for (int k=0; k