Multi Color LED (use with mDesigner)
The Multi Color LED is a light producing trinket which consist of 3 tiny LEDs of different colors (red, green, and blue). Each color can be set to different brightness levels. Combinations of various brightness levels for these colors can produce a wide variety of colors when mixed. Support for this trinket is found in mDesigner.
The following pins on the Hub or mCenter+'s Hub support this module:
|Pin 0||Yes||Not recommended, Pin 0 & 1 used by mDesigner (serial communication).|
|Pin 1||Yes||Not recommended, Pin 0 & 1 used by mDesigner (serial communication).|
Connecting 1 ColorLED is simply done by attaching a Hub Connector Wire to a pin on the Hub and the other end to the IN port of the ColorLED.
Similarly, additional ColorLEDs can be connected by attaching to different pins on the Hub. But this method can waste a lot of pins which could be used for other sensors or trinkets.
The ColorLED trinket has been designed to connect multiple ColorLEDs one after the other. This is called "daisy chaining. The method works as outlined:
- Use a Hub Connector Wire and connect one end a pin on the Hub. Connect the other end into the labeled IN port on a ColorLED.
- Use a Hub Connector Wire and connect one end to the previous ColorLED's OUT port. Connect the other end to the IN port of a new ColorLED.
- Use a Hub Connector Wire and connect one end to the previous ColorLED's OUT port. Connect the other end to the IN port of another new ColorLED.
- Repeat until the desired amount of ColorLEDs are attached.
When using the blocks below, the target ColorLED is the one to modify or interact with. A ColorLED attached to a project is addressed by the pin number and the index.
- Pin number is the labeled pin that the ColorLED (or the first in the string of ColorLEDs) is attached to on the Hub. All ColorLEDs in a chain will have the same pin number, since the first in the chain is attached to the Hub at that pin number
- Index refers the location that particular ColorLED is in a chain.
- The ColorLED connected directly to the Hub has an index of 0.
- Another ColorLED connected to the previous one will have an index of 1.
- Another ColorLED connected to the previous one will have an index of 2. And so forth.
ColorLED - Set Color
This block sets the target ColorLED to the selected color.
ColorLED - Set Color Transition
This block causes the target ColorLED to smoothly transition from the first color to the second color over the specified duration of time.
Note: This block is holding, which means the transition must complete before the program goes to the next block in the script.
ColorLED - Color
This block defines a specific color based on the amount of red, green, and blue. Numeric values between 0 and 255 can be set for each of the individual colors.
This block is used by dragging it into the "Color Selection" part of either the ColorLED - Set Color or ColorLED - Set Color Transition.