Itty Bitty Buggy: ColorLED Tutorial (mDesigner)

From Microduino Wiki
Jump to: navigation, search

ColorLED

Buggy Base contains two ColorLEDs on the underside. Each ColorLED is capable producing a wide variety of colors. The ColorLEDs are referenced as ColorLED "A" or "B" depending on the side it resides.

[file:Image of underside of buggy with A/B]

Block: Set Color

The ColorLEDs can be controlled using the ColorLED - Set Color block.

Function: This block sets the selected ColorLED to the chosen color.

IBB mDesigner ColorLED Set Color.png
  • ColorLED - select ColorLED to set color for (either A or B).
  • Color - color to set selected ColorLED to.

Example 1: Set the Color of ColorLED "A"

Note: this example is performed in online mode.

If you have overwritten the firmware when using "offline mode", please follow the instructions to reset back to "online mode".

Blocks Used
Block Category Blocks
Events MDesigner When Click Green Flag block new.png Info icon.png
Buggy IBB Buggy icon.png IBB mDesigner ColorLED Set Color NoLabels.png Info icon.png
Example

IBB mDesigner ColorLED Example1.png

Description: When activated, ColorLED "A" on Buggy Base will turn red.

Example 2: Set the Color of ColorLED "B"

Note: this example is performed in online mode.

If you have overwritten the firmware when using "offline mode", please follow the instructions to reset back to "online mode".

Blocks Used
Block Category Blocks
Events MDesigner When Click Green Flag block new.png Info icon.png
Buggy IBB Buggy icon.png IBB mDesigner ColorLED Set Color NoLabels.png Info icon.png
Example

IBB mDesigner ColorLED Example2.png

Description: When activated, ColorLED "B" on Buggy Base will turn green.

Example 3: Alternating ColorLEDs

Note: this example is performed in online mode.

If you have overwritten the firmware when using "offline mode", please follow the instructions to reset back to "online mode".

Blocks Used
Block Category Blocks
Events MDesigner When Click Green Flag block new.png Info icon.png
Control

MDesigner v1.6 Wait block.png Info icon.png

MDesigner v1.6 Forever block.png Info icon.png

Buggy IBB Buggy icon.png IBB mDesigner ColorLED Set Color NoLabels.png Info icon.png
Example

IBB mDesigner ColorLED Example3.png

Description: When activated, the ColorLEDs on Buggy Base will alternative between being on and off. As described below.

The following will loop forever:

  • ColorLED "A" will turn red. ColorLED "B" will turn black (off).
  • 1 second pause.
  • ColorLED "A" will turn black (off). ColorLED "B" will turn green.
  • 1 second pause.