-
• #2
Nice :)
Not sure if it helps, but there's also
Uint8ClampedArray
now which makes sure that if you give it a number >255 it doesn't wrap. It's not significantly slower thanUint8Array
either.
Nice :)
Not sure if it helps, but there's also Uint8ClampedArray
now which makes sure that if you give it a number >255 it doesn't wrap. It's not significantly slower than Uint8Array
either.
Rather than going with graphics, when you just want to control a small number of LEDs - for example, you want to control the status lights on a control panel with one pin.
I made a little object that provides a simple interface, and also allows the overall brightness to be dimmed (for example, in response to an ambient light level detector) while remembering the state of the lights. It allows updating by pixel, or color by color. The latter makes particular sense, for example, when using the WS2811 with multiple LEDs, rather than an RGB led.
Anyway, I like it for making status leds. That example is a 2 LED long string.