mBot F4 - Variables: Spirals


Concepts: Students take the concept of loops and variables further by creating a loop that changes the value of a variable with each new iteration.
Activity: Students create a program that has the mBot drive in spiral. To do so, students will need to create a variable and consider which parameter in their program will need to change with each iteration to create the desired shape. The lesson culminates in an activity that incorporates all of the coding concepts that students have learned in this course: Sequences, Loops, Events, Conditions, Functions, and Variables!


1. For students to discover a new ways to use variables and previously learned concepts such as a loop together

2. For students to understand how robotic actions can be changed by changing a variable

3. For students to use all of the coding concepts they have learned in a single program

Curriculum Connections Summary

  • Ontario - Mathematics - Algebra (Coding)
  • British Columbia - ADST
  • Alberta - ICT
  • Nova Scotia - ICT

Find Out More


mbot is the best of both worlds, transitioning students from Scratch Blocks to Text Code