LED Sensors
Last updated
Was this helpful?
Last updated
Was this helpful?
RGB LED stands for Red, Green, Blue Light-Emitting Diode. It is an electronic component that emits light in three primary colors: red, green, and blue. Unlike traditional single-color LEDs, RGB LEDs consist of three individual LED chips within a single package, each corresponding to one of the primary colors.
RGB LEDs are widely used in various applications that require dynamic and multi-colored lighting effects. By independently controlling the intensity of the red, green, and blue LEDs, it is possible to create a wide spectrum of colors. By varying the brightness levels of each primary color and mixing them together, RGB LEDs can produce virtually any color in the visible spectrum.
The Mantis Scout board contains a programmable LED that can be turned on/off from a scratch block. Currently there is support for specifying a color value (i.e., Red, Green, Blue) and a state (On/off).
In The example, we have defined three functions that control the state of the LED upon execution. As denoted by their names, they each turn on the LED and set it to the referenced color.
The example will cycle through and turn the LED different colors for 10 times, after the sensor Scout is connected, and the space bar is pressed.