Files
micromelon-website/content/resources/driving-shapes.mdx
Tim Hadwen 1f8c46597b Site audit: fix broken images, add activity metadata, clean up content
- Remove broken image references from 25 MDX files (deleted spacer/content images)
- Add codingSkills and roverConcepts frontmatter to 24 activity pages
- Fix "Activity Demonstration" headings in 15 activity files (plain text -> h3)
- Remove unused "All" category from 89 MDX files
- Decode HTML entities (> <  ) in 9 content files
- Escape bare < > characters in MDX to fix build errors
- Standardize contact email to contact@micromelon.com.au
- Add missing description to rover-repair-request metadata
- Include previous session work: about-us updates, difficulty filtering,
  LearningPathway component, expanded schools list, new product/resource images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 21:49:15 +10:00

40 lines
1.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Activity: Driving Shapes"
date: "2021-06-03"
categories: ["Activities", "Simulator Activities"]
tags: ["Iteration", "Motors", "Beginner"]
codingSkills: ["Iteration"]
roverConcepts: ["Motors"]
excerpt: "Learn iteration and how to control the Rovers motors."
featuredImage: "/images/resources/driving-shapes.png"
---
Learn to make your rover move and draw shapes with it. Start by making the rover drive in a square, then a triangle. Simplify your code with a loop and create more complex shapes like hexagons and octagons.
### Activity Demonstration
<iframe width="560" height="315" src="https://www.youtube.com/embed/_X2HdHv1Hqs" title="Driving Shapes Activity Demonstration" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
### Setup
All you need is a flat, uniform surface to drive on. Different surfaces have different friction properties. This means the tracks will slip differently dependent on where the rover is driving. Some movement blocks such as turn by degrees are calibrated for an average friction. When driving on other surfaces you may need to turn more or less to get the desired angle.
### Heres Our Approach
#### **Stage 1**
Use the basic movement blocks to program the rover to go forward then turn. Using the turn by degree blocks makes it easier to alter the code for other shapes.
#### **Stage 2**
Use a repeat loop block and change the number to the number of sides in your shape. Place your movement blocks inside the repeat.
#### **Stage 3**
To draw different shapes, change the number of times the loop repeats and the number of degrees in a turn.
![](/images/content/be348c-drivingshapes-answer.png)
Example Code