Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void barberpole(){
- for (int rotate = 0; rotate < NUM_STRIPS; rotate++){
- for( int i = 0; i < NUM_LEDS_PER_STRIP; i++) {
- for( int strip = 0; strip < NUM_STRIPS; strip++) {
- int diag = strip+i+rotate;
- diag = diag % 8;
- switch(strip){
- case 0:
- leds[diag][i] = CRGB(brightness,0,0);
- break;
- case 1:
- leds[diag][i] = CRGB(brightness,0,0);
- break;
- case 2:
- leds[diag][i] = CRGB(brightness,brightness,brightness);
- break;
- case 3:
- leds[diag][i] = CRGB(brightness,brightness,brightness);
- break;
- case 4:
- leds[diag][i] = CRGB(0,0,brightness);
- break;
- case 5:
- leds[diag][i] = CRGB(0,0,brightness);
- break;
- case 6:
- leds[diag][i] = CRGB(brightness,brightness,brightness);
- break;
- case 7:
- leds[diag][i] = CRGB(brightness,brightness,brightness);
- break;
- }
- }
- }
- FastLED.show(); // display this frame
- delay (200);
- CheckPots(); // Added to prevent brightness setting lag.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment