Arduino Robotics with the mBot

An introduction to robotics with the world's friendliest robot.

This course will take you on a whirlwind tour of full-stack web application development on the Raspberry Pi

Learn Arduino Robotics with the mBot, and explore STEM Education with Tech Explorations. Start your Maker adventure today.

Arduino Robotics with the mBot is a great place to start on your Maker Adventure. Parents and teachers find this to be a great starter project course for children as they explore coding and making together.

Arduino Robotics with the mBot will introduce you to the mBot, the world's friendliest educational robotics platform. The mBot is an Arduino-based, two-wheel robot that comes with built-in sensors and actuators, and that you can program using Scratch, a graphical programming language.

The mBot is also extensible, with a lot of components available that you can use to build your own robotic creations.

In this course, I will show you how to assemble the mBot, discuss the additional hardware options, and demonstrate how to program it on your tablet and your Windows or Mac OS computer.

The main project of Arduino Robotics with the mBot involves programming the mBot to follow an arbitrary black line on the floor.

In this project, we must combine our robot’s sensors and actuators efficiently to enable it to stay on the line while it travels on it as quickly as possible.

At first glance, you may think that getting a mBot robot to follow a line is easy. That’s not true for a robot.

As the programmer, you must “teach the robot” to do something that to a human is intuitive. You need to extract the intuitive understanding of how to follow a line and convert it into code.

The required hardware is the mBot itself, and a computer (Windows or Mac OS). You can purchase a mBot direct from its manufacturer, Makeblock, or your local reseller. You can download the software for free from the Makeblock website.

Explore STEM education with Tech Explorations and learn Arduino Robotics with the mBot.

Start your Maker adventure today.

What hardware will you need?

To complete the experiments in this course, you will need an mBot.

You can purchase an mBot from Amazon US, Amazon UK, Amazon DE, Amazon AU, and many other retailers around the world.

All the necessary hardware will come in the box.

What some of our students say about Arduino Robotics with the mBot

I have nothing but high praise for this course. The structure of the class is straight forward and easy to follow.

The instructor is very informative and a pleasure to listen to. His method of presenting the subject matter (the mBot and detailed graphical programming), is very well done.

As the subject matter becomes more complex, it still continues to be fun and easy to learn.

Carole Greene

The course is great for anyone new to programing young and old.

My son loves it, and Dr. Dalmaris teaches at a pace that everyone can understand and follow.

Also, the idea of a quiz at the end of each section was a nice addition to the course.


Very helpful. He compares a normal Arduino with the mBot custom controller.

Enjoyed learning scratch side by side with the actual Arduino code. Keep up the great work.

Robert Smith

After viewing this course, I purchased an mBot and plan to revisit the course lesson by lesson.

Dr. Dalmaris is a phenomenal teacher.

Stephen Hohm

A great course with lots of useful information.

The course also demonstrates what a powerful programming environment SCRATCH provides

Alan Binks

Great course. Well paced and thoughtfully structured, especially appropriate / easy for a beginner.

I've found it helpful to think about using the mBot and also teaching through various software options, and also had my 10 year old son watch parts to assemble the mBot, etc.

He got it up and running quickly and flawlessly, and found it very fun and exciting. Thanks so much!

Derek Fairchild-Coppoletti

What is this course about and what to expect?

Please watch this video to learn about the course curriculum and outcomes. Find out exactly what to expect so that you can plan your learning and make the most out of Arduino Robotics with the mBot.

Choose one of these options

You can enroll to our courses in one of three options: Solo, Community, and Mentor. For more information, please see this explainer page.

Video course

Video course only.

  • 5 hours on-demand video.
  • Download the track segments (PDF) and code examples (ZIP).
  • Full lifetime access.
  • Perfect for school students and homeschoolers interested in robotics projects.
  • Perfect for teachers, interested to learn skills for a STEM class.
  • Perfect for parents looking for a fun educational activities to take with their children.
  • A great course for electronics hobbyists looking for a gentle introduction to robotics.
Choose your enrollment option (learn more)


Once-off payment, best for self-sufficient learners on a budget.

Price in your currency:


Best for the social learner: become a member of the course community.

Price in your currency:

eBook only.

  • eBook in PDF format, printable, full color.
  • 233 pages.
  • Full courseware, use it in your classroom.
  • Downloadable resources: printable track segments (PDF), all book code (ZIP).
  • Perfect for school students and homeschoolers interested in robotics projects.
  • Perfect for teachers, interested to learn skills for a STEM class.
  • Perfect for parents looking for a fun educational activities to take with their children.
  • A great course for electronics hobbyists looking for a gentle introduction to robotics.
  • Access to the eBook and video course Discussion Space


Best for the social learner: become a member of the course community.

Price in your currency:

Video course curriculum

1 - Getting Started with the Raspberry Pi Full Stack
0010 - What is this course about
0030 - Parts you will need
0050 - How to get help
0060 - Code repository

2 - Get to know your Raspberry Pi
0110 - Raspberry Pi 3 specs and features
0111 - Raspberry Pi 4 specs
0120 - Raspberry Pi models
0130a - Raspberry Pi vs Arduino high level comparison
0130b - Raspberry Pi vs Arduino comparing the boards

3 - Setup the operating system
0160 - Operating systems for the Raspberry Pi
0165 - Headless vs GUI
0170 - Download and Install Raspbian Lite using Etcher
0180 - How to enable SSH and configure Wifi in headless mode
0190a - Boot for the first time and basic configuration
0190b - Connect for the first time using Mac OS
0190c - Boot for the first time and connection using Windows
0210a - Working as the "root" user
0210b - How to enable the "root" user for logging on with SSH

4 - How to recover from a serious glitch by backing up and restoring your SD card
0220a - Backup an SD card (Mac OS)
0220b - Restore an SD card (Mac OS)
0220c - Backup an SD card (Windows)
0220d - Restore an SD card (Windows)

5 - Pins, GPIOs, and how to control them with Python
0250 - The Raspberry Pi GPIO header and numbering system
0260a - A taste of Python on the Command Line Interpreter
0260b - A taste of Python on the Command Line Interpreter Functions
0270a - A taste of Python with a simple program
0280 - Wire a simple circuit
0290a - Install the Python installer program pip
0290b - Manipulate an LED using rpi.gpio
0300 - Read a button
0305 - Control an LED with a button
0310a - Install Git and the DHT library
0310b - Use the DHT22 sensor

6 - Setup the Web application Stack
0340 - The Web Application Stack
0350 - The Python Virtual Environment
0360a - Set up system Python - preparation
0360b - Download, compile and install Python 3
0365 - Setup the app Python Virtual Environment
0430a - Setup Nginx
0430b - Setup Flask
0435 - A tour of a simple Flask app
0440a - UWSGI installation
0440b - Nginx configuration
0440c - UWSGI configuration
0440d - UWSGI and Nginx configuration testing
0450 - Configure Systemd to auto-start Uwsgi

7 - Styling with Skeleton
0460a - Install SQlite3
0460b - Working with SQlite3
0470a - Static assets and the Skeleton boilerplate CSS
0470b - Setup the static assets directory
0470c - Introducing the Skeleton boilerplate CSS
0470d - Copying files using SFTP
0480 - Flask templates
0497 - Debugging a Flask app

8 - Getting started with our web application
0500a - Introduction to the section - Getting started with our web application
0500b - Install the DHT library and the rpi-gpio module
0500c - Install the DHT library and the rpi-gpio module
0510 - Create a database to store sensor data
0520 - Sensor data capture script
0530 - Schedule sensor readings with Cron
0540a - Display database records in the browser - Python script
0540b - Display database records in the browser - Template

9 - Implement the date range selection feature
0560a - Introduction - Implement the date-time range selection feature
0560b - Select range of records in SQLite
0570 - Set date-time range in URL and show records in browser
0580 - URL query string validation
0590 - Quick tidying up
0595 - Adding radio buttons for quick time-date range selection
0597 - Provision the Python script to work with the radio buttons

10 - Improving the user interface with Google Charts and date-time selector
0610a - Introduction to Google Charts
0610b - Implementation of Google Charts
0610c - Testing Google Charts
0650a - Introduction to the date-time picker widget
0650b - Implement the date-time picker widget
0650c - Upload and test the date-time picker widget

11 - Dealing with time zones
0665 - Adjust date-times to local time zone on the client side
0670a - Introduction to Arrow
0670b - Implement Arrow
0670c - Upload timezone changes and test
0680 - Link the two pages of the application

12 - Charting with Plotly
0710a - Install Plotly
0710b - Try out Plotly on the command line
0720a - Implement Plotly support on the client side
0720b - How to debug JavaScript
0730a - Add Plotly support to the app script
0730b - Server side debugging example

13 - Publish on the Internet
0810 - Setting a static IP address
0850 - Expose your app to the Internet with port forwarding

14 - Data-logging with Google Sheet
1010 - Introduction to this section and Google Sheet
1020 - Setup Google API credentials
1030 - Setup the Python libraries and Google Sheet
1040 - Implementation of Google Sheet data-logging

15 - Setup a remote Arduino sensor node with the nRF24
1100 - Introduction to the setup of an Arduino remote node
1110 - The Arduino node wiring (coming up)
1111 - The Arduino node sketch
1112 - Raspberry Pi and nRF24 wiring
1120 - The Raspberry Pi nRF24 receiver script
1123 - How to install the Python nRF24 modules on the Raspberry Pi
1125 - Test the nRF24 communications
1130 - Modify the front end of the application to show remote node data

16 - If This Than That alerts
1140 - An introduction to If This Than That
1143 - Create an IFTTT web hook and applet
1145 - Add IFTT code in the application and testing
1170 - Install the node listener script as an Systemd service

17 - Secure your application with SSL
1300 - Introduction to this section
1310 - Create a self-signed certificate for application
1320 - Edit Nginx configuration to use SSL
1330 - Test SSL in Firefox, Safari, Chrome

18 - Wrapping up
1410 - Make lab_env_db page update every 10 minutes
0760 - Recap and what's next

eBook table of contents

The mBot parts 6
Assembly: Attaching the DC Motors, Line Follower and Range Finder 23
Assembly: mCore tour and Bluetooth module 33
Assembly: Wiring batteries, and attaching the mCore 38
A quick demonstration 44

Options for programming the mBot 52
Demonstration of the mBlockly 57
Demonstration of the MakeBlock 71
Demonstration of the mBlock 85
Recapping Section 2 90

Programming the mBot on your computer using mBlock 93
Install mBlock on your computer 94
A quick look at Scratch 100
Creating and uploading your first program 114
Motor control 125
Moving left, right, backwards 130
Recapping Section 3 139

Programming structures and sensors 142
The loop 144
The distance/proximity sensor 153
The “if” and “if...else” control structures 163
The buzzer 171
Recapping Section 4 175

The line sensor 178
Adding the motors 186
Turning around at the end of the line 192
Using a button to start and stop 199
Custom blocks (functions) 205
Recapping Section 5 215

Restoring the firmware 218
Restoring the default program 224
Recapping Section 6 227

Appendix A - Glossary 228

The course instructor

The course instructor is Peter Dalmaris, PhD.

Peter has created over 20 other courses on technology education.

He is the author of Maker Education Revolution, a book on how making is changing the way we learn and teach.

He is the host of the Stemiverse and Tech Explorations podcasts, in which he discusses technology and education with engineers, educators, scientists and Makers from around the world.

Copyright , Tech Explorations - Privacy