These addressable (smart) LEDs are very common. Using a single pin, hundreds of LEDs can be set to any color. Those smart LEDs have a small processor (WS2812) built inside of them. An incoming digital signal sets each LED to a specific color. This way, several LEDs can be controlled using a single pin.
When the user sets the color to one the connected LED, BrainPad holds the color state for each LED in its internal memory.
When ready, all LEDs can be updated at one using Neo.Show(). This function needs to know the pin to send the date to and how many LED to update, pin 1 with 8 LEDs in this example.
To determine the color value, use search the web for “Color picker” and use the hex value. Note that the websites use # to mark a hex value, but in coding we typically use 0x.
For applications that require speed. The provided Neo.SetMultiple() method that send the data right to the LEDs, and it does them all at once. The Show() function is not needed with SetMultiple().
uint colors = new uint; colors = 0xFF0000; colors = 0x00FF00; BrainPad.Neo.SetMultiple(1, colors);
# add code
How small can a processor be? We are now talking about a processor that is smaller than an ant! Here is a fun fact, a processor is usually smaller than the packaging around it. The packaging is made larger so it can be handled easier.