Topic outline

  • Topic 1

    What is a robot?

    The term "Robot" comes from a Czech word, robota, meaning "forced labor". The term relates to the concept of machines doing tasks that humans may find dangerous, repetitive or demeaning.

    A robot usually conjures up visions of human like machines taking over the world, but in fact robots are involved in much more menial tasks such as running a washing machine, operating traffic lights or the many functions involved in the running of a modern car.

    Robots can be of two sorts;

    • Autonomous
    • Tethered

    They can be controlled by sensors and are operated by devices collectively known as actuators. (eg a motor)

    More and more, robots can become aware of their environment and analyse it using Artificial Intelligence.

    • Topic 2

      The mBot can be thought of as an autonomous floor robot. It can operate as either a tethered robot or as autonomous.

       It is a programmable and consists of a microcontroller board and various sensors and outputs.

      The following lists it components.

      Software and

      mBlock(graphical) Mac, Windows,  iPad mBlocky
      Arduino IDE


      Light Sensor, Button, IR Receiver, Me Ultrasonic Sensor, Me Line-follower Sensor


      Buzzer, RGB LED, IR Transmitter, two motor ,ports


      Based on Arduino Uno


      3.7V Lithium battery(charger on board) or four 1.5V AA batteries (not included)


      Bluetooth(Bluetooth Version)
      2.4GHz wireless serial(2.4G Version)


      17 x 13 x 9 cm assembled
      • Topic 3


        Do a little research

        As of Dec 16, 2019, there are 1,209,600 new data producing social media users each day. There are 682 million tweets per day! More than 4 million hours of content uploaded to Youtube every day, with users watching 5.97 billion hours of Youtube videos each day.

        While there is a dark side to the web, and users must be careful to hide their identity when using some sites, one can be assured that some of the content uploaded is about mBots.

        Similarly there are site like instructables, little bird and others as well as the Makecode site itself with lots of help.

        If you arrive at a problem and have not researched it, there is no excuse to not being able to to derive a solution.

        And don't forget, Google receives over 63,000 searches per second on any given day. That's the average figure of how many people use Google a day, which translates into at least 2 trillion searches per year, 3.8 million searches per minute, 228 million searches per hour, and 5.6 billion searches per day.

        Google is a great place to start.

        • Topic 4

          Working in Groups

          Next time you watch a movie, take note of the credits. There can be hundreds of names of people who wrangle animals, do all the stunts, cater and so on.

          Computer coding often requires large teams, with specialised roles and specialised techniques to achieve goals.

          In our class, we have eight mBots and twenty four pupils. So we will form teams of three. The roles will be 

          • Leader
          • Coder
          • Engineer

          and these can be rotated each week.

          • Topic 5

            First steps

            Go to Makeblock website

            Download relevent software

            • Web based
            • Offline based

            Read the manuals.

            Makeblock web site

            Getting started with mBot (pdf)

            Download mBlock editor

            kids can code

            When you are ready, connect the mBot in to your computer.

            This can be done by 

            • USB
            • Bluetooth.

            Upgrade the firmware as required.

            Click on devices

            • Delete Codey
            • Add mBot

            Note: There are different events depending if you want to go live of autonomous.

            Only took me an afternoon to find this out.

            • Topic 6

              Addendum :   You can use an Arduino with makeCode

              First, delete any devices already selected.

              Then add other devices => Arduino

              When first connecting to the Arduino select "Show all connectable devices" then look for the update button. (You need be connected to the Internet.)


              • Topic 7

                Blink : Turning on the LED

                Create this in the web browser.

                • Topic 9

                  Get the mBot to run (Sequence)


                  Create a document in your Google Drive to record your activities.

                  Use title, aim, method, conclusions for your procedual documentation.

                  Use graphics, pictures and video 

                  Make your robot

                  1. go forward
                  2. go backwards
                  3. go in a square

                  Make your robot

                  1. sweep left
                  2. sweep right
                  3. go in a circle
                  Challenge: put these together in 10 second dance
                  • Topic 10

                    Get mBot to go forward a measured distance

                    How can you predict how far a mBot will travel in 

                    • 1 second
                    • 10 seconds
                    • 1 minute

                    How can you set up an experiment to get reliable data?

                    • Topic 11

                      Making a plan (algorithms)

                      The word algorithm comes from the name of the 9th century Persian and Muslimmathematician Abu Abdullah Muhammad ibn Musa Al-Khwarizmi (Latinized Algoritmi), he was mathematician, astronomer and geographer during the Abbasid Caliphate, a scholar in the House of Wisdom in Baghdad.

                      He is often considered one of the fathers of algebra.

                      Also the creator of the numbers which we use today.

                      The word means "step wise" and means the number of step needed to solve a problem.

                      In coding, a program that uses the least number of steps is considered to be "elegant". 
                      • Topic 12

                        Make mBot navigate a rectangle (complex command)

                        This is a timed exercise. 

                        Clear a space in the classroom and set out a rectangle.

                        Use the techniques you have used to design a program to get your mBot around the course. 

                        Team that gets your mBot around in the shortest possible time, the shortest possible time.

                      • Topic 13

                        Light sensor (Programmed)

                        • Topic 14

                          Sub procedures; using structured code ( parameter passing)

                          • Topic 15

                            Line follower : Stop on a black line

                            line-follower-blocks Code and explanation

                            • Topic 16

                              Line following (Preprogrammed)

                              • Topic 17

                                Object avoidance

                                Here are a series of tutorials on various aspects of the mBot

                                Robots can sense their environment through many ways. For the mBot, these include sensors like

                                • infra red 
                                • ultra violet
                                • sonic

                                others might be

                                • touch (bumper switch)
                                • temperature
                                • wireless
                                • bluetooth

                                • Topic 18

                                  Simple line following

                                  Run the mBot over a black line. You should see the two line sensors shineblue if they re over white. Over black, they are off.

                                  Opposite is a table of the values of the four combinations expressed as binary. We can test for these and then change our robot accordingly.


                                  Image result for mbot line following code
                                  • Topic 19

                                    Line following (Programmed)

                                    • Topic 20

                                      Obstacle avoidance with built in ir sensor (decision)

                                      Challenge : mBot crosses black line and stops.
                                      • Topic 21

                                        Obstacle avoidance with sonic sensor

                                        A sonic sensor copies the way a bat navigates at night. It emits a sound we can hear and uses that to estimate the distance an object is away from the front of the mBot.

                                        The sensor has the following pins

                                        • Vcc       the pin where the 5 vols is connected
                                        • GND     the earth to complete the circuit
                                        • Trigger  makes the little ping
                                        • Echo     reads the signal and then measures the time it takes

                                        The basic code is below.


                                        1. To load the necessary background code, goto the extension center and load the Gizmo pack.

                                        2. Make sure you have selected the correct port on your mBot

                                        3. There is an inequality distance > 12. make sure you have it the correct way.

                                        4. The code has been slightly embellished with led shows colour and stop moving. Is there a better solution?

                                        • Topic 22

                                          Sub procedures; using structured code (creating subprocedures)

                                          • Topic 23

                                            Running via wireless

                                            • Topic 24

                                              Running via blue tooth


                                               very simplistic program for a remote control. The brownish blocks are general-purpose blocks for managing control flow (here, one never-ending loop, several case distinctions and a “wait” statement). The blue blocks are specific for mBot: the hexagonal blocks query the IR receiver for signals sent by the remote control, the rectangular blocks are used to control the robot’s motors.

                                              Experiment to see if your remote interacts with an mBot.

                                              • Topic 25

                                                Using the board : Robotic arm

                                                • Topic 26

                                                  Using the board : hexapods