Multi Color LED (use with mDesigner)

From Microduino Wiki
Revision as of 20:20, 5 June 2018 by Sonny (talk | contribs) (Connectivity)
Jump to: navigation, search

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.

Compatible Pins

The following pins on the Hub or mCenter+'s Hub support this module:

Hub Digital Pins v2-01.png
Pin Name Compatibility Notes
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).
Pin 2 Yes
Pin 3 Yes
Pin 4 Yes
Pin 5 Yes
Pin 6 Yes
Pin 7 Yes
Pin 8 Yes
Pin 9 Yes
Pin 10 Yes
Pin 11 Yes
Pin 12 Yes
Pin 13 Yes
Pin A0 Yes
Pin A1 Yes
Pin A2 Yes
Pin A3 Yes
Pin A6 Yes
Pin A7 Yes
Pin I2C No


Connectivity

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.

Target ColorLED

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 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.

Blocks

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.