Subversion Repositories Projects

Rev

Rev 1793 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1790 - 1
Light Sequence Template:
2
 
3
Created by / Erstellt von:  "Magomora"
4
 
5
Explanation / Erklärung:
6
----------------------------------------------
7
Wie rainbowCycle nur für alle LEDs gleichzeitig.
8
----------------------------------------------
9
 
10
Command / Befehl:
11
----------------------------------------------
12
rainbowCycleAll(dly, cyl, ri1, ri2, ri3, ri4, ri5, ri6, ri7, ri8)
13
----------------------------------------------
14
 
15
 
16
Code:
17
----------------------------------------------
18
void rainbowCycleAll(uint8_t wait, uint8_t cyl, uint8_t ri1, uint8_t ri2, uint8_t ri3, uint8_t ri4, uint8_t ri5, uint8_t ri6, uint8_t ri7, uint8_t ri8) {
19
 uint16_t i, j, w;
20
 
21
 for (j=0; j < 384; j++) { // 5 cycles of all 384 colors in the wheel
22
 for (i=0; i < riggerSize; i++) {
23
 // tricky math! we use each pixel as a fraction of the full 384-color
24
 // wheel (thats the i / strip.numPixels() part)
25
 // Then add in j which makes the colors go around per pixel
26
 // the % 384 is to make the wheel cycle around
27
       strip.setPixelColor(i, Wheel(j),ri1, ri2, ri3, ri4, ri5, ri6, ri7, ri8);
28
     }
29
   strip.show(); // write all the pixels out
30
    for (w=0; w < wait; w++){
31
        delay(5);
32
        }
33
   }
34
}
35
----------------------------------------------