Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void wave_fx(){
- static byte middle = NUM_LEDS/2;
- currentMillis = millis();
- if(currentMillis - previousMillis >= 10) {
- if (count++ == 255) {
- count = 0;
- }
- for (byte i = 0; i <= middle; i++) {
- wave = sin8((millis() / wave_scale) * i);
- leds[i] = CHSV(ihue, 255, wave);
- }
- for(byte i = middle; i < NUM_LEDS; i++){
- leds[i] = leds[NUM_LEDS - i];
- }
- previousMillis = currentMillis;
- LEDS.show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement