-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmatrix.h
More file actions
19 lines (11 loc) · 709 Bytes
/
matrix.h
File metadata and controls
19 lines (11 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef MATRIX_H
#define MATRIX_H
void matrix() { // A 'Matrix' like display using sampleavg for brightness. Also add glitter based on peaks (and not sampleavg).
// Persistent local variables
static uint8_t thishue=0;
timeval = 40; // Our EVERY_N_MILLIS_I timer value.
leds[0] = ColorFromPalette(currentPalette, thishue++, sampleavg, LINEARBLEND);
for (int i = NUM_LEDS-1; i >0 ; i-- ) leds[i] = leds[i-1];
addGlitter(sampleavg/2); // Add glitter based on sampleavg. By Andrew Tuline.
} // matrix()
#endif