How to Train a Robot

CoderDojo Carlton’s Adventure with Robotics will introduce young minds to the amazing world of robots. With four different sessions run over the weekend, everyone will have an opportunity to explore and learn. Kids will have opportunities to explore Arduino, Makey Makey, mBot, and circuitry by bringing a paper robot to life.

How to Train a Robot

Ever wanted to learn how to control a robot but didn’t know where to get started? In this workshop participants will explore basic programing which will allow them to control mBot robots. By using coding you will program the robots to beep and blink, to move, to see and finally to dance. In the final project the robots will compete in the greatest robot dance off ever. The robot winner will be chosen to lead the Mexican wave all to the beats of ‘I like to move it’. Bring the spirit of festival and robots together but be aware – the robots are coming and remember – Be Cool*!!

*All workshops run by CoderDojo require participants to adhere to one rule: Be Cool (Be Respectful, Be Inclusive, Be Helpful, Be Patient, Be Kind, Be Positive)!

Lead Instructor/Facilitator: Alicja Cwierz
Assistants/Mentors: Jay Alexander, Tamara Jones, Carole Pillette, David Rodriguez Sanchez
Estimated Length: 2 hours
Target Age: 7-16

Prerequisites: BYO laptop per person or per team (2 x participants), preinstalled with the mBlock software, which you can download at

Get familiar and set up connection to mBot
In this part of the workshop participants will be introduced to the mBlock program interface and will learn how to connect it to mBots. The participants will then write a simple test program to check if the connection is working. We will look as well at how to read sensors on the mCore board attached to mBots and how to interpret the readings. This will provide a foundation for the challenges that will use conditions and will make mBots do something based on a specific sensor reading.

Step 1: Blink and Beep
First robots will learn how to beep and blink in different colours. Participants will be introduced to the brief colour theory and learn how to combine Red Green and Blue to light up LED lights in their favorite colours.
Challenge 1: Blink like police car
Make robots blink like a police car in blue and red

Step 2: Move it
In this part of the workshop the mBots will learn how to move in all directions. We will set worksheets with black markers for the start and finish lines for robots and program them to drive a set distance to stop in time before the finish line.
Challenge 2
The students will be asked to rewrite their code to use readings from the line-following sensor and stop when the mBot is over the black marker. When all participants complete the challenge, they will line up all the mBots and compete to see which robot reaches the finish line first.

Step 3: Watch it
Last thing the robots will learn is to avoid obstacles and not to bump into each other when they perform their dance moves. We will look at how to read the ultrasonic sensor and how to check for foreign objects that are on the mBots pathway.
Challenge 3
The students will use their learnings to move mBots through a mini obstacle maze.

Final project
Participants will be asked to use gained knowledge about robots to write a program with a ‘cool’ sequence of robot moves. They will do so to the beats of music. The participants will be encouraged to use sound, lights and to watch for any obstacles and to keep the robots within a marked area.
The group then chooses the ‘coolest’ robot dance move. The winner shares their code with everyone. Each participant then adds a slight delay to their program i.e mBot 1 starts at 0 seconds, mBot 2 starts at 1 second and so on. The mBots are then placed in order of their wait time and are triggered to start all at the same time to form a Mexican wave style dance.

40% off tickets during the Friday Flash Sale, midnight - midnight Nov 10!

Buy tickets Back to agenda