I want to have a few LEDs running around the strip in a chasing pattern, so I found this bit of code which works well, but needs to be modified for my needs. I figured out that the i-2 part is the number of LEDs that are lit up and travel together around the strip, lighting up 2 and making it look like it snakes along the strip. I want to do more than 2 lit up together at one time, but when I changed i to i-5 or 10, that number of LEDs light up, but the speed greatly decreases and it crawls. How do I change the number of LEDs that are doing this pattern from 2 but be able to change or keep the quicker pace. Changing the delay number for the current i-2 does change the speed, but changing the 2 to any higher value makes the speed of the pattern drop significantly. Here is the bit of code:
for(int i=0;i<NUM_LEDS;i++){
leds[i-2].setRGB(0,0,0);
leds*.setRGB(255,255,0);*
- FastLED.show();*
- delay(50);*