mBlock 3 Example Projects

Example: Control mBot Through Bluetooth Controller

Through programming, we can enable Bluetooth Controller to perform the following functions:

Use the joystick to move mBot

Move the right joystick: mBot moves in the same direction as the joystick and its moving speed depends on how far the joystick is pushed.

Use the buttons to move mBot

  • Press the D-pad :Moves forward at power 100%
  • Press the D-pad :Moves backward at power 100%
  • Press the D-pad :Turns left at power 100%
  • Press the D-pad :Turns right at power 100%

Use the buttons to make mBot turn around

  • Press button L1: Spins from right to left
  • Press button R1: Spins from left to right

Use the buttons to control the color of LEDs

  • Press number button 1:All LEDs on in red
  • Press number button 2:All LEDs on in green
  • Press number button 3:All LEDs off
  • Press number button 4:All LEDs on in blue
  • Press multipke number buttons: All LEDs on in mixed color

Use the buttons to control the buzzer

  • Press button L2: Play note D5 at 0.25 beats
  • Press button R2: Play note A3 at 0.5 beats

For the specific code, download the example project and open it on mBlock 3.

Download Example Project

Example: Control mBot Ranger Through Bluetooth Controller

Through programming, we can enable Bluetooth Controller to perform the following functions:

Use the joystick to move mBot Ranger

Move the right joystick: mBot Ranger moves in the same direction as the joystick and its moving speed depends on how far the joystick is pushed.

Use the buttons to move mBot Ranger

  • Press the D-pad :Moves forward at power 100%
  • Press the D-pad :Moves backward at power 100%
  • Press the D-pad :Turns left at power 100%
  • Press the D-pad :Turns right at power 100%

Use the buttons to make mBot Ranger turn around

  • Press button L1: Spins from right to left
  • Press button R1: Spins from left to right

Use the buttons to control the color of LEDs

  • Press number button 1:All LEDs on in red
  • Press number button 2:All LEDs on in green
  • Press number button 3:All LEDs off
  • Press number button 4:All LEDs on in blue
  • Press multiple number buttons: All LEDs on in mixed color

Use the buttons to control the buzzer

  • Press button L2: Play note D5 at 0.25 beats
  • Press button R2: Play note A3 at 0.5 beats

For the specific code, download the example project and open it on mBlock 3.

Download Example Project

Example: Control Ultimate Through Bluetooth Controller (applicable only to robotic arm tanks)

Through programming, we can enable Bluetooth Controller to perform the following functions:

Use the joystick to move Ultimate

Move the right joystick: Ultimate moves in the same direction as the joystick and its moving speed depends on how far the joystick is pushed.

Use the buttons to move Ultimate

  • Press the D-pad :Moves forward at power 100%
  • Press the D-pad :Moves backward at power 100%
  • Press the D-pad :Turns left at power 100%
  • Press the D-pad :Turns right at power 100%

Use the buttons to make Ultimate turn around

  • Press button L1: Spins from right to left
  • Press button R1: Spins from left to right

Use the buttons to raise or lower the robot arm

  • Press number button 2: Raises the robot arm
  • Press number button 3: Lowers the robot arm

Use the buttons to control the robot gripper

  • Press number button 1: Closes the robot gripper
  • Press number button 4: Opens the robot gripper

For the specific code, download the example project and open it on mBlock 3.

Download Example Project

results matching ""

    No results matching ""