- 1. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color[COLOR] for [TIME] secs
- 2. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color[COLOR]
- 3. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color red [R] green [G] blue [B]
- 4. [ICON] servo [PORT] [SLOT] positioned at [DEGREE]
- 5. [ICON] seven-segment[PORT] shows number [NUMBER]
- 6. [ICON] limit switch [PORT] [SLOT] is pressed?
1. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color[COLOR] for [TIME] secs
Lights up the specified LED(s) on the RGB LED module connected to the specified port of mBot in the specified color for the specified period of time
How to Use
mBot provides four ports that can be used to connect RGB LED modules. Click the port number to select one.
This block provides five LED options. Click to select one.
Click to define the color through the settings of color, saturation, and brightness.
Click to define the time you want.
Alternatively, you can put a reporter block in this block, for example:
Example
Note: Ensure that you have connected an RGB LED module to mBot through port 1.
When you press the space key, all LEDs on the RGB LED module are lit up in blue for five seconds.
2. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color[COLOR]
Lights up the specified LED(s) of the RGB LED module connected to the specified port of mBot in the specified color
How to Use
mBot provides four ports that can be used to connect display panels. Click to select the one to which the RGB LED module is connected.
An RGB LED module provides four LEDs. Click to select the one(s) you want.
Click to define the color through the settings of color, saturation, and brightness.
Example
Note: Ensure that you have connected an RGB LED module to mBot through port 1.
When you press the space key, all the LEDs on the RGB LED module are lit up in red.
3. [ICON] RGB LED [PORT]lights up [LED_POSTION]with color red [R] green [G] blue [B]
Lights up the specified LED(s) of the RGB LED module connected to the specified port of mBot in the color that is the combination of the specified intensity of red, green, and blue
How to Use
mBot provides four ports that can be used to connect display panels. Click to select the one to which the RGB LED module is connected.
An RGB LED module provides four LEDs. Click to select the one(s) you want.
Click to define the color by setting the intensity of red, green, and blue.
Intensity range of red, green, and blue: 0–255
Example
Note: Ensure that you have connected an RGB LED module to mBot through port 1.
When you press the space key, all the LEDs on the RGB LED module are lit up in yellow.
4. [ICON] servo [PORT] [SLOT] positioned at [DEGREE]
Positions the servo horn on the servo connected at the specified slot of the RJ25 adapter connected to the specified port of mBot at the specified angle
How to Use
Servos can be connected to mBot through RJ25 adapters (shown in the preceding figure). mBot provides four ports that can be used to connect RJ25 adapters. Click to select the one to which the RJ25 adapter is connected.
The RJ25 adpater provides two slots for connecting servos. Click to select the one to which the servo is connected.
You can click the default angle to define the one you want.
Alternatively, you can put a reporter block of the numeric type into it, for example:
Example
Note: Ensure that you have connected a servo at slot 1 of the RJ25 connected to port 1 of mBot.
When you press the space key, the servo horn rotates and stops at the angle of 90 degrees.
5. [ICON] seven-segment[PORT] shows number [NUMBER]
Displays the specified number on the seven-segment serial display connected to the specified port of mBot
How to Use
mBot provides four ports that can be used to connect display panels. Click to select the one to which the seven-segment serial display is connected.
The seven-segment serial display is a 4-digit digital tube that can display numbers and a few special characters, such as the speed, time, score, temperature, and distance that are counted or detected by sensors.
You can put the corresponding reporter block into it to display the value counted or detected by a sensor, for example:
Example
Note: Ensure that you have connected a seven-segment serial display to mBot through port 1, and an ultrasonic sensor through port 3.
When you press the space key, the seven-segment serial display displays the distance of the obstacle detected by the ultrasonic sensor.
6. [ICON] limit switch [PORT] [SLOT] is pressed?
Determines whether the limit switch connected at the specified slot of the RJ25 adapter connected to the specified port of mBot is pressed
How to Use
mBot provides four ports that can be used to connect RJ25 adapters. Click to select the one to which the RJ25 adapter is connected.
The RJ25 adpater provides two slots for connecting limit switches. Click to select the one to which the limit switch is connected.
Note: This is a Boolean block that contains a condition. Use it in combination with another block that requires a condition.
Example
Note: Ensure that you have connected a display panel to mBot through port 1 and an RJ25 adapter through port 2, and connected a limit switch to slot 1 of the RJ25 adapter.
After pressing the space key, press the limit switch. The display panel displays the text yes.