The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Adafruit TFT LCD: Color Indicator Spots

These spots might come in handy as status indicators and tiny mode control buttons:

Resistor Color Code Spots
Resistor Color Code Spots

The montage is 800% of the actual 8×8 pixel size that’s appropriate for the Adafruit TFT LCD.

They’re generated from the standard colors, with the “black” patch being a dark gray so it doesn’t vanish:

# create resistor-coded color spots
# Ed Nisley - KE4ZNU
# January 2015

SZ=8x8

convert -size $SZ canvas:gray10 -type truecolor Res0.bmp
convert -size $SZ canvas:brown	-type truecolor Res1.bmp
convert -size $SZ canvas:red	-type truecolor Res2.bmp
convert -size $SZ canvas:orange	-type truecolor Res3.bmp
convert -size $SZ canvas:yellow -type truecolor Res4.bmp
convert -size $SZ canvas:green	-type truecolor Res5.bmp
convert -size $SZ canvas:blue	-type truecolor Res6.bmp
convert -size $SZ canvas:purple	-type truecolor Res7.bmp
convert -size $SZ canvas:gray80	-type truecolor Res8.bmp
convert -size $SZ canvas:white	-type truecolor Res9.bmp

montage Res*bmp -tile 5x -geometry +2+2 -resize 800% Res.png

For a pure indicator, it’d be easier to slap a spot on the screen with the Adafruit GFX library’s fillRect() function. If you’re setting up a generic button handler, then button bitmap images make more sense.

Comments

2 responses to “Adafruit TFT LCD: Color Indicator Spots”

  1. Kenmore 158 UI: Button Framework Functions | The Smell of Molten Projects in the Morning Avatar

    […] button has a slightly different routine to maintain a simple counter stepping through all ten resistor color codes in […]

  2. Kenmore 158 UI: Button Rework | The Smell of Molten Projects in the Morning Avatar

    […] The LCD screen looks just like that; I blew out the contrast on the surroundings to provide some context. The green square on the left is the Arduino Mega’s power LED, the purple dot on the right is the heartbeat spot. […]