Sugar - RGB Ring Light
Introduction
Feature
Signal Time-Series Signal
Module Principle
The colored LED lamp bead has a lamp controller directly built-in, in addition to the 3-color LED. This is called the IC lamp bead. You only need to input a 24-bit RGB control signal, and it will automatically generate a drive pwm signal internally. It also has built-in signal forwarding. For continuous input signals, after intercepting the first 24 bits, the following data is automatically forwarded from the DOUT port to the next lamp bead.
Coding Blocks
Building Blocks - Function Description
ID | Building Block Image | Building Block Function |
---|---|---|
1 | Colorful lights initialization settings. You can choose the 3 RGBs on board or the light ring of other interfaces. External light rings generally use 8 RGBs | |
2 | Synthesize color display by customizing three colors | |
3 | Set the brightness of RGB colorful lights, 0-100 | |
4 | Control the color of the colorful light with the specified serial number. The serial number starts from 1. Refresh display needs to be added later to take effect | |
5 | Customize the values of the three color lamp beads inside the lamp bead to control the color of the colorful light | |
6 | Control the display color of all colorful lights. It can take effect without adding refresh display | |
7 | Turn off the light with the specified serial number, and refresh the display later to take effect | |
8 | Control the display color of all colorful lights. It can take effect without adding refresh display | |
9 | Control all colorful lights to turn off, and it can take effect without adding refresh display | |
10 | Make the colorful light display take effect | |
11 | Set the overall effect of all lights |
Cases
Brightness Control - Breathing Light
Sequence Control - Flowing Light
View the preset effect
📑: It is recommended that you use the online mode and click directly to view the preset effect. It is convenient and quick.
Using On Microbit
Coding Platform
Microsoft MakeCode for micro:bit Use Makecode coding platform
Add plug-in
Search for sugar in the extension, click add
Circuit Connection
Microbit Interface | Cable Used | |||
---|---|---|---|---|
RGB Light Ring | P0 | White PH2.0-3Pin Interface Cable |
Building Blocks - Function Description
ID | Building Block Image | Building Block Function |
---|---|---|
1 | Initialize pins and number of lights | |
2 | Take a range of LEDs | |
3 | The whole light strip displays rainbow effect | |
4 | The whole light strip displays one color | |
5 | The whole light strip, as a whole, displays columnar, suitable for music spectrum | |
6 | Display needs to take effect when controlling a small number of lights | |
8 | Customize LED display | |
9 | Overall movement | |
10 | Overall movement (loop), head and tail loop | |
11 | Control a single LED. The light starts from the serial number of 0 as the first one | |
12 | Control the brightness of the light strip | |
13 | Customize the value of LED color |
## Case 1: Controlling a single light