Glass Tiles: Glow vs. Flash Firmware

Although it’s not obvious in a still picture, the firmware now supports both the continuously changing colors of the Nissan fog lamp (mashed with tweaks from the vacuum tube lights) and the randomly changing colors from the LED matrix, both using SK6812 LEDs rather than the failing WS2812 modules:

Glass Tile - glow vs flash
Glass Tile – glow vs flash

Flash is a misnomer, as the tiles simply change from one color to the next, but I’ve never been adept at picking catchy names. In any event, the glass tiles on the left show nice pastel shades, in contrast to the bright primary(-ish) colors appearing on the right.

The colors are random numbers from 1 to 7, because 0 produces a somewhat ugly dark cell. The SK6812 modules have a white LED in addition to the RGB LEDs in the WS2812 modules, so I replace the “additive white” R+G+B color with the more-or-less true white (warm, for these modules) LED.

The new color goes into a cell picked at random (0 through 3, for 2×2 frames), except if the cell already holds the same color, whereupon a simple XOR flips the colors, except if the cell is already full-on white, whereupon it becomes half-on white to avoid going completely dark.

The glass tiles must change colors at a much slower pace than the 8×8 LED matrix, because there are so few cells; a random delay between 500 ms and 6 s seems about right.

They look really great in a dim room!

The Arduino source code as a GitHub Gist:

5 thoughts on “Glass Tiles: Glow vs. Flash Firmware

  1. I believe video production would say “fade” vs “cut,” but I know that’s a different context …

    1. Perhaps it’d be a “cut” if all the tiles changed at once and a “fade” if one (or more?) tiles changed slowly.

      It’s definitely not a “flash”, though, so that’s wrong.

      Good naming is the hardest thing!

  2. Getting fancy there! Interestingly, the 0-255 values driving addressable LEDs produce linear brightness changes, but our eyes have roughly logarithmic response, so when I do fades and other kinds of animations I usually do them in a “perceptual” range and then convert to linear right before output. You can cheat and use x^2 as that curve is pretty close.

    1. At one point I had the ahem bright idea to use exponential steps for each color, tinkered it up, and saw what eight PWM steps looked like. Wrong implementation.

      I should fire the sequences directly into ColorHSV() and see what happens.

Spam comments get trashed, so don't bother. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s