Created
June 15, 2014 16:41
-
-
Save dlmorgan999/8a48f24ee9b9ca29042f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void WaveTest::draw() | |
{ | |
uint8_t brightness; | |
uint8_t brightness1; | |
uint8_t brightness2; | |
unsigned long endTime; | |
shuffleColors(); | |
blankDisplay(); | |
endTime = millis() + 15000; | |
while (millis() < endTime) | |
{ | |
for (int i = 0; i < LEDS_PER_STRIP; i++) | |
{ | |
brightness1 = sin8((millis() / 50) * i); | |
brightness2 = cos8((millis() / 20) * i); | |
for (int j = 0; j < NUMBER_OF_STRIPS; j++) | |
{ | |
if (j % 2 == 0) | |
{ | |
brightness = brightness1; | |
} | |
else | |
{ | |
brightness = brightness2; | |
} | |
ledsALL[j][i] = CHSV(colorsH[j].hue, DEFAULT_SATURATION, brightness); | |
} | |
} | |
updateDisplay(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment