0,0 → 1,35 |
Light Sequence Template: |
|
Created by / Erstellt von: "Magomora" |
|
Explanation / Erklärung: |
---------------------------------------------- |
Wie rainbowCycle nur für alle LEDs gleichzeitig. |
---------------------------------------------- |
|
Command / Befehl: |
---------------------------------------------- |
rainbowCycleAll(dly, cyl, ri1, ri2, ri3, ri4, ri5, ri6, ri7, ri8) |
---------------------------------------------- |
|
|
Code: |
---------------------------------------------- |
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) { |
uint16_t i, j, w; |
|
for (j=0; j < 384; j++) { // 5 cycles of all 384 colors in the wheel |
for (i=0; i < riggerSize; i++) { |
// tricky math! we use each pixel as a fraction of the full 384-color |
// wheel (thats the i / strip.numPixels() part) |
// Then add in j which makes the colors go around per pixel |
// the % 384 is to make the wheel cycle around |
strip.setPixelColor(i, Wheel(j),ri1, ri2, ri3, ri4, ri5, ri6, ri7, ri8); |
} |
strip.show(); // write all the pixels out |
for (w=0; w < wait; w++){ |
delay(5); |
} |
} |
} |
---------------------------------------------- |