I have to make a chase down a lenght of LED and have found this in the demo code.
void sinelon()
{
// a white dot sweeping back and forth, with fading trails
fadeToBlackBy( leds, NUM_LEDS, 30);
int pos = beatsin16(12,0,NUM_LEDS);
leds[pos] += CRGB::White;
}
Can this be made to travel in one direction only not back and forth as it currently does?
Any help apreciated
Here’s an experiment for you @Erin_St_Blaine http://pastebin.com/tc4CTCCr
I’m guessing you’re either going to use this in some awesome version of musical chairs, or for a 10 foot tall digital raffle wheel.
@Erin_St_Blaine My beat8_plus_random_freeze.ino example does work. But I just realized I probably made it WAY more complicated then needed. (Isn’t it funny/great/trippy when you look at something again and see a much simpler solution?) In my original beat8.ino example above, if you want it to stop moving change the moveSpeed variable to… zero! lol.
It could be suddenly changed to zero or even ramp down to zero via code after a random time. Prior to stopping the moveSpeed could also be modulated with sin8, or some sort of external sensor (yeah!). I leave it to your wonderful creative side as to how to do that.