Mblock5 Getting Started
Mblock5 Getting Started
Mblock5 Getting Started
Contents
About mBot
Constructing mBot
mBot's Default Program
mBlock 5 Software
Programming mBot: 3 Easy Steps
Saving Your mBlock Programs
First mBot Program: Simple Obstacle Avoidance
Using mBlock Palettes and Blocks
Additional Resources
About mBot
mBot is an affordable STEM robot kit designed to help bring computer science education into the
real world. mBot is made by Makeblock® , a leading DIY-robotics-construction and STEM-
education platform for students, educators, and hobbyists. At the heart of mBot is the mCore, a
microcontroller based on the Arduino™ Uno. mCore has four sensor ports and two motor ports. It
also includes two RGB LEDs, a Buzzer, a Light Sensor, an IR Transmitter and Receiver, and an
Onboard Button. Two of mBot's sensors, the Ultrasonic Sensor and the Line-Follower Sensor, are
connected to mCore's sensor ports.
mBot comes loaded with a Default Program that has three modes: Mode A–Manual Mode,
Mode B–Obstacle Avoidance, and Mode–C Line Following. In addition to these three modes, mBot
can run a program uploaded directly to the robot via a USB cable. You can write these programs
using mBlock software running on a Chromebook™ or a Windows® or macOS® computer.
PIONEERING TECHNOLOGIES
FOR STEM SINCE 1981
Vernier Software & Technology www.vernier.com Vernier and caliper design are our registered trademarks.
mBot and mBlock are trademarks of Makeblock. All
13979 SW Millikan Way [email protected]
other marks not owned by us that appear herein are the
Beaverton, OR 97005-2886 property of their respective owners, who may or may not
be affiliated with, connected to, or sponsored by us.
Released: 9/2019
Getting Started with mBot and mBlock 5
Constructing mBot
To construct mBot, follow the building instructions included with mBot and keep these tips in mind:
l Construction typically requires 30 minutes.
l The only tool required is the included screwdriver.
l To power mBot, you need either four AA batteries or the optional 3.7 V rechargeable battery;
batteries are not included with mBot.
l The IR Remote Control requires a CR2025 coin cell battery (not included). The remote is used
to direct mBot.
mBot starts off in Mode A. There are two ways to change the mode:
l Select the mode by pressing the A, B, or C button on the IR Remote Control. Make sure there
is a battery in the remote!
l Press the Onboard Button on mBot.
When you upload a program to mBot, your new program replaces the Default Program. You can
return mBot to the Default Program at any time by following the "Return mBot to the Default
Program" directions:
mBlock 5 Software
You can use mBlock 5 software on a computer or Chromebook to write programs for mBot and
upload your programs to the robot. Note: Makeblock regularly releases updates to their programs
and the download process evolves quickly; contact Vernier for additional support. Also, note that
there is an mBlock app available for Android and iOS; this guide covers mBlock 5 software.
COMPUTERS (W INDOWS AND MACOS)
Visit www.mblock.cc/mblock-software to download and install mBlock 5 software for Windows or
macOS.
CHROMEBOOKS
To use mBlock on a Chromebook, you will run mBlock in the Chrome browser. Visit
www.mblock.cc/mblock-software and follow the link to open mBlock in a browser.
The mBlock 5 is software based on Scratch 3.0, the graphical programming language developed by
MIT’s Lifelong Learning Lab. If you are familiar with Scratch, you will find mBlock easy to use.
Even if this is your first time using a graphical programming language, you can pick it up quickly.
mBlock 5 converts your block code into Arduino C. You can observe this translation by clicking the
"</>" symbol on the right side of the screen. This code is there so you can see what the
C programming language is like; it is not necessary for you to understand it or do anything with it.
a. Use a USB cable (included with mBot) to connect mBot to your computer or Chromebook.
b. Click in the Devices tab (see Figure 1). mBlock 5 will suggest the port to which
mBot is connected. Click Connect.
c. Click , and the program will be loaded onto your mBot.
METHOD 2 BLUETOOTH
a. Connect the Makeblock Bluetooth Dongle to a USB port on your computer. The Bluetooth
LED will flash slowly.
b. Press the Bluetooth symbol to pair mBot to the Adapter. The LED will flash quickly and then
stay lit (without flashing).
c. Click in the Devices tab (see Figure 1). mBlock 5 will suggest the port to which
the dongle is connected. Click Connect. NOTE Makeblock considers this a USB connection; do
not switch to the Bluetooth 4.0 tab.
d. Click , and the program will be loaded onto your mBot.
Once the upload is finished, you will see a message telling you the upload is complete. The program
will start running as soon as the program has uploaded. TIP You can restart your program at any time
by power-cycling mBot or pressing the Reset button on mBot.
Build the Obstacle Avoidance program in mBlock and upload the code to mBot. Does mBot move
as expected? Experiment with the code by doing the following:
l Start the program with a button push after you turn on mBot.
l Stop mBot long enough so you can easily turn off the robot.
l Increase or decrease the driving or turning speed.
l Increase or decrease the "wait" durations following the "run backward" or "turn left" blocks.
l Change the distance at which an obstacle is detected from 15 cm to a greater distance.
l Add commands so that sometimes mBot turns left to avoid an obstacle and other times turns
right.
Improving Your Program
First of all, don’t forget to save your code frequently! After you run your program you will
undoubtedly find ways to improve it. As you change your code you will need to upload the new
code to your mBot to test it. When you are ready to test your new program, follow these steps:
1. Use the USB cable or Bluetooth Dongle to connect mBot to your computer or Chromebook.
2. Click and confirm the port to connect to mBot in mBlock 5.
3. Click . When the upload is complete, test your new program.
Additional Resources
Activities and technical support can be found on the Vernier website, www.vernier.com/mBot
l Coding with mBot: Life Hacks, a STEM module with seven activities; free with the purchase
of the STEM Classroom Kit (order code: MBOT-KIT)
l Coding with mBot: Self-Driving Vehicles, a STEM module with nine student activities (order
code: MBOT-MSDV-E)
l mBot Troubleshooting and FAQs
These two books offer an in-depth dive into coding with mBot and include a variety of activities:
l mBot for Makers: Conceive, Construct, and Code Your Own Robots at Home or in the
Classroom by Andrew Carle and Rick Schertle
l A Gentle Introduction to Robotics: Volume 1: mBlock and the mBot by Charles McKnight