8 RGB LED Ring¶

Description |
8 RGB (Red Green Blue) LED Ring. Also called a NeoPixel ring. This device has 8 individual RGB LED pixels. Pixels can be illuminated any color and assigned individually. |
Usage |
Designed to be used with the Micropython NeoPixel interface. DI is connected to the Yellow pin V is connected to the Red pin G is connected to the Black pin |
Voltage Range |
4 - 7V |
Interface Type |
NeoPixel |
Example Usage |
from microbit import *
from neopixel import NeoPixel
RGB_RED = (20, 0, 0)
RGB_GREEN = (0, 20, 0)
RGB_BLUE = (0, 0, 20)
RGB_MAGENTA = (20, 0, 20)
RGB_YELLOW = (20, 20, 0)
RGB_WHITE = (20, 20, 20)
RGB_OFF = (0, 0, 0)
# BE SURE TO USE A 5V OUTPUT PIN!
np = NeoPixel(pin16, 8)
# set a few different pixels
np[0] = RGB_RED
np[1] = RGB_GREEN
np[2] = RGB_BLUE
np[5] = RGB_WHITE
np.show()
sleep(1000)
# set all pixels yellow
for pixel in range(8):
np[pixel] = RGB_YELLOW
np.show()
sleep(1000)
|