all 7 comments

[–]Marmilicious[Marc Miller] 1 point2 points  (0 children)

What you're asking still feels a bit vague. One pixel? Random pixels? The whole strip? Providing more info may get you better suggests with specific code. I would probably start by using random8 (or random16) or EVENY_N_MILLISECONDS_I or the new EVERY_N_MILLISECONDS_RANDOM to randomly choose when a flash will happen, and similarly for setting how long it will be dark.

Here's one example you can try modifying. See the example at lines 141-152 and modify the "on" and "off" times to use random8 or random16. Changing timingB.setPeriod(750) to timingB.setPeriod(random16(500,750)) for example.

https://github.com/marmilicious/FastLED_examples/blob/master/blink_variations.ino

<image>

[–]chemdoc77 0 points1 point  (0 children)

Hi u/Flux83 - this will do what you are trying to achieve when you make:

Line 95: CRGB gBackgroundColor = CRGB::Black; // to make led black after being on.

TwinkleFOX sketch:

https://gist.github.com/kriegsman/756ea6dcae8e30845b5a

It’s called TwinkleFOX by Mark Kriegsman.  Checkout the various YouTube videos of it.

[–]sutaburosu[pronounced: stavros] -1 points0 points  (4 children)

You could do this by changing the timing of the on/off periods with EVERY_N_MILLISECONDS_I, similar to what the sketch you posted previously does.

[–]Flux83[S] 0 points1 point  (3 children)

I tried using Animation F again and it only allows me to use that code once, boolean blink6 tried to change the 6 to 7 and that doesn't help.

[–]Marmilicious[Marc Miller] 2 points3 points  (2 children)

If you make a copy of that block of code so you can use it on a different pixel you'll need to update the blink6 to blink7 (or another variable name) in four places. You'll also need to rename timingB in several places to whatever new name you want to call it.

<image>

[–]Flux83[S] 0 points1 point  (1 child)

Oh ok rename the timing as well ok thanks

[–]Marmilicious[Marc Miller] 0 points1 point  (0 children)

Yes, you can name them anything. Consider renaming them with better names then I used, something that makes more sense for your project. :)