mBot2 Operational Guide

Thank you for choosing mBot2!

mBot2 is an overall upgraded product. Read this guide through and follow the instructions so that you won’t miss the functions of mBot2.

1. Before you use mBot2

1.1 Know your mBot2

mBot2 is highly integrated and extensible. You can use it to design various robot projects. It can work with Makeblock metal parts, mBuild modules, and third-party electroinc modules and structural parts to extend its structures and functions.

As shown in the preceding figure, mBot2 uses CyberPi as its main control board and is equipped with multiple electronical modules, including mBot2 Shield, ultrasonic sensor 2, quad RGB sensor, and encoder motors. For the functions and features of the electronic modules, see “8. More information.”

1.2 Build your mBot2

You need to build mBot2 before using it. Follow the mBot2 Quick Start Guide included in the package to build mBot2. Alternatively, you can read or download the mBot2 Quick Start Guide online.

mbot2.0_ KD010368000.pdf

1.3 Set the system language

To change the system language, enter the CyberOS system on CyberPi. For details, see “Set the system language” in the CyberPi Operation Guide.

2. Use the preset programs

  1. Restart mBot2.

Before running a preset program, turn mBot2 off and then turn it on to ensure that it is restarted.

  1. Enter CyberOS.

CyberPi automatically enters CyberOS after you restart mBot2. If it doesn’t, press the Home button on CyberPi.

  1. Choose and execute a program.

Take program 1 as an example.

Move the joystick down to choose Switch Program, choose Program1, and press button B to execute the program.

Follow the instructions to execute the program.

Note: You can press the Home button to return to the homepage of CyberOS and choose to execute another preset program.

3. Start programming

This section describes how to implement the functions of mBot2 by programming it with mBlock 5.

3.1 Download and install the required software

Currently, CyberPi supports the block-based graphical programming and Python programming. Make sure that you have downloaded and installed the required software.

Language Editor mBlock 5 version Required software URL address
Scratch, MicroPython mBlock Block-based Editor PC client on Windows/Mac

mBlock 5 for Windows

mBlock 5 for Mac

N/A
 Web version on Windows/Mac

Google Chrome

mLink2 for Windows

mLink2 for Mac

https://ide.makeblock.com/
Scratch mBlock Block-based Editor Mobile app

image

mBlock 5 app Use your phone or tablet to scan the QR code:

image

Alternatively, search for “Makeblock” in app stores.

Python, MicroPython mBlock-Python Editor Web version on Windows/Mac

Google Chrome

mLink2 for Windows

mLink2 for Mac

https://python.makeblock.com/

3.2 Add and connect mBot2

  1. Use a Micro USB cable (Type-C) to connect mBot2 to your PC, and power on mBot2.

 

image

  1. Click + add on the Devices tab, select CyberPi in the device library, and click OK.

  1. Click Connect to connect CyberPi to mBlock 5.

Note:

If the version of mBot2 you got is delivered with a wireless adapter, you can connect mBot2 to mBlock 5 wirelessly by referring to “Wirelss Adapter.”

mBot2 can be connected to your PC directly through the Bluetooth adapter of your PC. To determine whether your PC or mobile device meets the requirements for direct Bluetooth connection, see “Bluetooth Compatibility.”

image

A message is displayed after CyberPi is connected, indicating that the connection is successful.

3.3 Add extensions

  1. Add the mBot2 extension.

  1. Add the Ultrasonic Sensor 2 extension.

  1. Add the Quad RGB Sensor extension.

After adding the extensions, you can see the blocks provided for mBot2.

Now, you can start to program mBot2!

3.4 Set the programming mode

mBlock 5 provides two programming modes, namely Live and Upload. You can click to switch the modes.

Live: In this mode, you can view the program execution effect in real time, which facilitates the debugging of the program. In this mode, you must keep CyberPi connected to mBlock 5. If they are disconnected, the program cannot be executed.

Upload: In this mode, you need to upload the compiled program to CyberPi. After being successfully uploaded, the program can still run properly on CyberPi when it is disconnected from mBlock 5.

4. Example programs

You can understand the functions of mBot2 through example programs.

On mBlock 5, choose Tutorials > Example Programs and click mBot2 to view example programs provided for mBot 2.

5. Tips for using mBlock 5

5.1 Block comments

You can read the block comments in an example program to better understand its function and operation.

5.2 Block help

If you don’t understand a block when using it, you can right-click it and click Help that appears.

5.3 Learn Python based on blocks

mBlock 5 provides two programming languages for mBot2, namely block-based programming and Python. In Upload mode, you can click the buttons on the right to switch the programming languages.

In addition, when programming mBot2 in Upload mode, you can click the switching button on the right to view the corresponding Python statements (obtained by converting the blocks).

Note: You can see Python API Documentation for mBot2 Shield to know about more functions of CyberPi and mBot2.

6. Python programming

Open mLink2 and click Create now in the mBlock Python editor section.

For details about how to program mBot2 on mBlock-Python Editor, see mBlock-Python Editor Online Help.

7. Feedback and suggestions

Should you have any feedback or suggestions on CyberPi and mBot2, contact our R&D team through:

support@makeblock.com