Micromelon Robotics
Platform
Resources
NewsAbout UsDownload
Support
Build Your Kit

Stay in the loop

New activities, teaching guides, and product updates delivered to your inbox.

Micromelon Robotics

Australian-made educational robotics for the next generation of innovators.

contact@micromelon.com.au

Company

  • About Us
  • Privacy Policy
  • Terms and Conditions

Products

  • Micromelon Rover
  • Code Editor
  • Robot Simulator
  • Junior
  • Python Library

Support

  • Resources
  • News
  • Rover Repairs
  • Contact
  • Build Your Kit

© 2026 Micromelon Robotics Pty Ltd. All rights reserved.

ABN 56 623 302 296

← Back to Resources
ActivitiesIntermediate

Activity: Driving Shapes 2

Coding Skills

IterationVariablesMaths

Rover Concepts

Motors
Activity: Driving Shapes 2

Program the Rover to request a number from the user, then drive in a shape with that many sides. For more advanced maths, make the Rover draw a shape with uneven side lengths.

Activity Demonstration: Driving Shapes 2

Setup

All you need is a flat, uniform surface to drive on. Different surfaces have different friction properties, so the tracks will slip differently depending on where the Rover is driving. Some movement blocks (like Turn by Degrees) are calibrated for an average friction, on other surfaces you may need to turn more or less to get the desired angle.

Our Approach

Stage 1: Ask for a Number of Sides

Use the Request Input block to ask for the number of sides. This block returns a text string, so convert it to an integer so it can be used as a number. Store the result in a variable called sides.

Stage 2: Loop Once Per Side

Once you have the number of sides, create a Repeat for Number loop and place the sides variable in the loop count. The loop runs once for each side.

Stage 3: Draw Each Side

Inside each iteration, draw a side: move forward, then turn by degrees. Calculate how many degrees to turn each time using a simple math operation, divide 360 by the number of sides.

Example code, drawing a user-defined shape

Example code, drawing a user-defined shape

Continue Learning

Activity: Rover Van GoghRelated resourceActivity: Rover Van GoghGet your art on with the pen attachment!

Activity: Maze IIRelated resourceActivity: Maze IIBuild on your maze-solving skills by using both IR sensors and the ultrasonic sensor together to handle more complex maze layouts.

Activity: Driving School BasicsRelated resourceActivity: Driving School BasicsLearn the basics of Rover motors and sensors while navigating Duck City.

← Return to Resources