User Manual
RAM Again
On a per-pixel basis, Adafruit_DotStarMatrix is no more memory-hungry than Adafruit_DotStar, requiring 3 bytes of
RAM per pixel. But the number of pixels in a two-dimensional display takes off exponentially…a 16x16 display requires
four times
the memory of an 8x8 display, or about 768 bytes of RAM (nearly half the available space on an Arduino
Uno). It can be anywhere from
tricky
to
impossible
to combine large displays with memory-hungry libraries such as SD
or ffft. Fortunately 32-bit boards (e.g. Metro Express) are fairly mainstream now.
Gamma Correction
Because the Adafruit_GFX library was originally designed for LCDs (having limited color fidelity), it handles colors as
16-bit values (rather than the full 24 bits that DotStars are capable of). This is not the big loss it might seem. A quirk of
human vision makes bright colors less discernible than dim ones. The Adafruit_DotStarMatrix library uses
gamma
correction
to select brightness levels that are visually (though not numerically) equidistant. There are 32 levels for red
and blue, 64 levels for green.
The Color() function performs the necessary conversion; you don’t need to do any math. It accepts 8-bit red, green
and blue values, and returns a gamma-corrected 16-bit color that can then be passed to other drawing functions.
© Adafruit Industries https://learn.adafruit.com/adafruit-dotstar-leds Page 43 of 48