"Red, White, and Blue" Challenge! While the LEDs are "Red, Green , and Blue",

“Red, White, and Blue” Challenge!
While the LEDs are “Red, Green, and Blue”, there are times when it’s fun to run a “Red, White, and Blue” animation! With all the great folks here, I thought it might be fun to propose a color theme for the week: code up and show off some a “Red, White, and Blue” themed animation, and if you can, share the code so that other people can play with it and build on it!

Starting Hint: if you download the FastLED 2.1 branch from github, the “ColorPalette” example has a Red, White, and Blue color palette already coded into it, as well as a bunch of other palettes, which you can just disable…

Update: I also posted a new ‘starter sketch’ using a Red-White-and-Blue palette here: https://gist.github.com/kriegsman/ccffc81a74bc03636ce1 Run, remix, repost, and have fun!

Coding/power/design hint: Use “gray” when you mean white. Here’s why:

  • “Red” is 0xFF0000, which means that the red LED is fully on, while green and blue are totally off. “One LED” worth of light and power.

  • “Blue” is 0x0000FF, which means that the blue LED is fully on, while green and red are totally off. Still just “one LED” worth of light and power.

  • “White” as normally defined is 0xFFFFFF, which means that the red, green, and blue LEDs are ALL fully on. That means THREE LEDs worth of light and power, which is much brighter than Red or Blue.

  • “Gray” (or Grey) is 0x808080, which means that the red, green, and blue LEDs are each only on at 50% power, making for a total of “1.5 LEDs” worth of power and light.

That means that “Gray” is actually much more closely matched in brightness to “Red” and “Blue” than “White” is. So if you’re using Red, Blue, and ‘White’ in your design, de-power the ‘White’ down to ‘Gray’, and you’ll get a more balanced appearance.

Save full-on “White” for those blinding fireworks flares you have in mind!

“Why Red, White, and Blue?”

Well, it’s a popular and attractive color combination. It appears on many national flags, such as the flags of Australia, Bermuda, British Virgin Islands, Cambodia, Chile, Cook Islands, Costa Rica, Cuba, Croatia, Czech Republic, Dominican Republic, Falkland Islands, Faroe Islands, Fiji, France, Iceland, Laos, Liberia, Luxembourg, Montserrat, Nepal, Netherlands, New Zealand, North Korea, Norway, Panama, Paraguay, Puerto Rico, Russia, Sabah, Samoa, Schleswig-Holstein, Serbia, Sint Maarten, Slovakia, Slovenia, Taiwan, Thailand, Turks and Caicos Islands, and the United Kingdom. (Thank you, Wikipedia.)

Also, Red, White, and Blue appears on the flag of the United States, which is celebrating it’s national independence day (“The Fourth of July”) this Friday!

This sounds like fun Mark! I’ll see if I can come up with something on my 24x24 matrix.

Wow! Yes- do!

I won’t be able to use palettes due to the issue I discovered, but I already have some ideas (it’s distracting me from work! :wink: ).

For folks who can use FastLED v2.1 with palettes here’s a simple sketch using a Red White, and Blue palette, and some flashes of “glitter”: https://gist.github.com/kriegsman/ccffc81a74bc03636ce1

Feel free to borrow it, break it, and build on it!

The glitter is a nice touch.

Thanks. I really like layering different effects, like in this case: a smooth crawl of color stripes, and then on top of that a ‘sprinkle’ of bright white ‘glitter’. Assuming you’re not re-reading from the leds[] array after you call FastLED.show(), it’s perfectly fine to throw whatever you like in there.

Other times, instead of just setting the ‘glitter pixel’ to pure white, I’ve just added a little brightness:
leds[ pos ] += 0x808080;
This maintains an element of the existing hue, more or less, but still makes that pixel ‘pop’ for that one frame.

Hmmm. I will throw something on my infinity mirror to see if I got anything

Very nicely done. And timely as well. Thanks Mark!

@Mark_Kriegsman I just want to let you know that I am adding glitter to EVERYTHING. (My husband thinks I’m maybe over-using the glitter feature but THAT IS IMPOSSIBLE)

^^ nicely done. I never got time to do the challenge. :frowning:

@Erin_St_Blaine : Not to get into a marital dispute here, but I agree with you: “too much glitter” is IMPOSSIBLE!
(It’s also impossible to clean up, but luckily this LED kind doesn’t quite get everywhere the way that craft glitter, or so help me, body glitter does!)

Anyway: GREAT! I hope it brings you glittery joy!

Although not overly exciting, my entry is easily and highly configurable and doesn’t require complex code. http://youtu.be/rrzJgDa05Lc