Files
micromelon-website/content/resources/driving-shapes.mdx
Tim Hadwen ae3ae18585 Major site overhaul: resources hub, content migration, new blog posts, forms
- Redesign /resources as sectioned hub with category pages
- Migrate 645 Squarespace CDN images to local /images/content/
- Create 9 new news/blog posts with event photos
- Fix blog post slugs (rename gibberish filenames)
- Rename Design Blog to Design Blogs across site
- Remove education page, replace with Platform in nav
- Redesign rover repair request form with dynamic rover entries
- Add school search combobox to contact, store, and repair forms
- Extract shared KNOWN_SCHOOLS data
- Make /rover-expansion-3d-printing dynamically pull from MDX
- Add related resources sections to product pages
- Fix homepage broken /quote links to /store
- Store page: sample kit cards, inline quote builder, mailing list opt-in
2026-03-01 17:14:05 +10:00

84 lines
1.7 KiB
Plaintext
Raw 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", "All", "Simulator Activities"]
tags: ["Iteration", "Motors", "Beginner"]
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.
####
Relevant Coding Skills
Branching
-->
Iteration
Functions
Variables
-->
Algorithm Design
-->
Maths
####
Relevant Rover Concepts
Ultrasonic
-->
IR
-->
Colour
Gyroscope
Accelerometer
Motors
LEDs
-->
Buzzer
-->
Activity Demonstration
### 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