Full-color LED

From Microduino Wiki
Jump to: navigation, search

Function of the Module

Example 1: Lighten the Colored LED

Overview

To light a Colored LED graphically.

Bill of Material

  • Module
Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 Sensor pin board
Microduino-Color LED 1 Colored LED
  • Other Equipment
    • One USB cable
    • One sensor cable
Color led-module.jpg

Hardware Buildup

  • Setup 1: Connect the IN port with D6 of the Hub, which is the LED control pin. Users can change that on your own.
MCookie-strandtext-sensor.JPG
  • Setup 2: Connect the CoreUSB, Hub and Color LED together to the computer through a USB cable.
MCookie-strandtext-pc.JPG

Mixly Programming

  • Step1: Open Mixly software and you'll find "Light Control" in "Executer" under the item of "Microduino".
Mixly-colorled.JPG
  • Step2: Drag out "Light Preparation".
  • Step3: Drag out "Light Control".

Step4: See the syntax description after buildup.

Debugging

  • Step1: Select the right board card(Core USB 32U4) and COM port(Recognized automatically by default).
Mixly board COM.jpg
  • Step2: After uploading, you can see the light turns red. The color of the light can be changed, but it needs re-upload after changing.
  • The steps above are based on debugging on the computer. The code is inside the core module after uploading, which can also be powered by battery box.
MCookie-BMPin1.jpg
  • Connect the activated battery box with BM module.
CoreUSB colorled steup.jpg

Example 2: Colored LED Blinks

Overview

To make the light blink graphically.

Mixly Programming

  • We need delay time here. So, find "Wait" in the "Control" item, the unit is "ms" and "1000ms=1s".
Mixly delay.jpg
  • See syntax description after buildup.
  • Make sure the right board and COM port and then upload. The light can blink every 1s by here. Users can change the color or the time to see what happens by doing that.

Experiment 3: "Breathing Light"

Overview

To let the colored LED light "breath"--to grow bright and then slowly go out, achieving the effect of "breathing".

Mixly Programming

  • Use RGB to represent color. (R:255, G: 0, B: 0). Thus, we need to gradually change the RGB values to get gradient color change of the light, achieving the effect of "breathing light".
  • We also need "Loop", which can be found in "Control" item.
Mixly for.jpg
  • Instruction of "Loop".
  • See syntax description after buildup.
  • Make sure the right board card and COM port, and then upload. You can make the light go on and out every 15ms and within the 15ms, the change is gradually from bright to dark or from dark to bright, which is repeated and therefore, achieve "breathing" effect.

Example 4: How to Control Multiple Lights

Overview

Lighten two lights at the same time and switch to another color every 1s.

Hardware Connection

  • LED cascade(OUT):The former LED is OUT and the next one is IN.
CoreUSB Ble steup11.jpg

Mixly Programming

  • Change the light number that needs to be controlled.
  • Program writing and syntax description.
  • The two light go on at the same time. The first light goes red and the second goes blue. After 1s, the first one turns green and the second one turns purple. That'll repeat again and again.
  • Users can use more lights or DIY more interesting projects, such as traffic light.