1. Download and install the required software
Click To Access mBlock (& mLink)
2. Connect mBot Ranger to mBlock 5
You can connect mBot Ranger to mBlock 5 through a USB cable or Bluetooth 4.0.
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.
Use a USB cable
(1) Use the USB cable delivered with mBot Ranger to connect your mBot Ranger to a USB port of you computer.
(2) Power on your mBot Ranger.
(3) On mBlock 5, click + on the Devices tab, select mBot Ranger in Device Library, and click OK.
(4) Click Connect. On the dialog box that appears, click the USB tab and click Connect.
mBot Ranger is successfully connected to mBlock 5 when the message indicating successful connection is displayed.
Use 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 Ranger.
(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 Ranger in Device Library, and click OK.
(4) Click Connect. On the dialog box that appears, click the Bluetooth tab and click Connect after your mBot Ranger is found.
mBot Ranger is successfully connected to mBlock 5 when the message indicating successful connection is displayed.
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 Ranger 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 Ranger. After being successfully uploaded, the program can still run properly on mBot Ranger when it is disconnected from mBlock 5.
Now, you can start to program mBot Ranger by dragging blocks to the scripts area.
4. Set the programming language
mBlock 5 provides two programming languages for mBot Ranger, 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 Ranger 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
Please sign in to leave a comment.