1. Download and install the required software
Click To Access mBlock (& mLink)
2. Connect mBot to mBlock 5
You can connect mBot to mBlock 5 through a USB cable or Bluetooth 4.0. If you purchase a 2.4G version, you can also connect it to mBlock 5 through the 2.4G module.
Using Bluetooth 4.0 (available only for the Bluetooth version)
Using the 2.4G module (available only for the 2.4G version)
In the following operation, mBlock 5 PC client is used. If you use mBlock 5 on the web, open mLink 2 and perform the same steps.
Using a USB cable
(1) Use the USB cable delivered with mBot to connect your mBot to a USB port of you computer.
(2) Power on your mBot.
(3) On mBlock 5, click + on the Devices tab, select mBot in Device Library, and click OK.
(4) Click Connect. On the dialog box that appears, click the USB tab and click Connect.
mBot is successfully connected to mBlock 5 when the message indicating successful connection is displayed.
Using Bluetooth 4.0
System requirements:
- Windows: The version of Bluetooth must be 4.0; for other Bluetooth versions, a Bluetooth 4.0 adapter is recommended (refer to Bluetooth Dongle for detailed instructions).
- Mac OS: Most of Mac OS models are supported.
(1) Power on your mBot.
(2) Turn on the Bluetooth on your PC.
- Windows: On the task bar, select action center > Bluetooth.
- Mac OS: Choose Apple menu > System Preferences, then click Bluetooth.
(3) On mBlock 5, click + on the Devices tab, select mBot in Device Library, and click OK.
(4) Click Connect. On the dialog box that appears, click the Bluetooth tab and click Connect.
mBot is successfully connected to mBlock 5 when the message indicating successful connection is displayed.
Using the 2.4G module
Computers with the following systems are recommended:
- Windows: Windows 7 or later
- Mac OS: macOS Sierra 10.12 or later
To connect mBot in this way, you need to use the 2.4G module and adapter.
You can use them simply by plugging them. No drivers or pairing is required.
(1) Insert the 2.4G module into mCore on mBot and insert the adapter into a USB port of a computer.
(2) Power on your mBot.
(3) On mBlock 5, click + on the Devices tab, select mBot in Device Library, and click OK.
(4) Click Connect. On the dialog box that appears, click the 2.G tab and click Connect.
After the successful connection, mBlock 5 displays the following information indicating the 2.4G connection.
The firmware of mBot can't be updated through 2.4G connection.
If mBlock 5 prompts you to update the firmware of mBot during programming, exit from the the 2.4G connection and connect mBot to mBlock 5 in the USB mode to update its firmware. Then you can connect mBot to mBlock 5 in the 2.4G mode for programming.
3. Set the programming mode
mBlock 5 provides two programming modes, namely Live and Upload. You can click to switch the mode.
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 mBot 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 mBot. After being successfully uploaded, the program can still run properly on mBot when it is disconnected from mBlock 5.
Now, you can start to program mBot by dragging blocks to the scripts area.
If you have no idea how to program mBot, you can also refer to the example programs to get started.
4. View and use example programs
5. View block help
mBlock 5 provides multiple types of blocks for mBot. If you don't understand a block when using it, you can right-click it and click Help that appears.
6. Set the programming language
mBlock 5 provides two programming languages for mBot, namely block-based programming and Arduino C. In Upload mode, you can click the buttons on the right to switch the programming languages.
In addition, when programming mBot in the block-based language in Upload mode, you can click the switching button on the right to view the corresponding Arduino C statements (obtained by converting the blocks).
Comments
does not tell us how to move the mbot
Exactly!
Please sign in to leave a comment.