Consistent hero layouts, activity page redesign, new content, and YouTube embeds
- Product pages (Code Editor, Robot Simulator): text-left/image-right hero layout - Related resources capped at 3 items on all product pages - Making Music activities renamed to I, II, III - New Maze I/II/III and Sumo I/II/III difficulty-graded activities - YouTube demo videos restored on 12 activity pages from old site - Activity pages: two-column hero with coding skills & rover concepts tags - Blog/news pages: same two-column hero layout with date - Resource type extended with codingSkills, roverConcepts, tags fields - Removed raw "Relevant Coding Skills/Rover Concepts" text from activity MDX Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,80 +1,46 @@
|
||||
---
|
||||
title: "Activity: Maze"
|
||||
title: "Activity: Maze I"
|
||||
date: "2021-06-04"
|
||||
categories: ["Activities", "All", "Simulator Activities"]
|
||||
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Beginner"]
|
||||
excerpt: "Learn branching, iteration, algorithm design, and how to use the Rover’s motors, ultrasonic, colour, and IR sensors."
|
||||
excerpt: "Learn the basics of maze solving using the ultrasonic and IR sensors to detect walls and navigate simple paths."
|
||||
featuredImage: "/images/resources/maze.png"
|
||||
---
|
||||
|
||||
Create a maze that students have to navigate their rover through. Use the rovers two IR sensors and ultrasonic sensor to detect walls and where they can drive. Use the rovers colour sensor to detect the finish.
|
||||
Navigate your rover through a maze using the ultrasonic sensor to detect walls ahead and the IR sensor to check for walls to the side. This beginner approach introduces the fundamentals of maze solving with simple branching logic.
|
||||
|
||||
####
|
||||
Relevant Coding Skills
|
||||

|
||||
|
||||
Branching
|
||||
|
||||
Iteration
|
||||
|
||||
Functions
|
||||
|
||||
Variables
|
||||
|
||||
-->
|
||||
|
||||
Algorithm Design
|
||||
|
||||
Maths
|
||||
|
||||
####
|
||||
Relevant Rover Concepts
|
||||
|
||||
Ultrasonic
|
||||
|
||||
IR
|
||||
|
||||
Colour
|
||||
|
||||
Gyroscope
|
||||
|
||||
Accelerometer
|
||||
|
||||
Motors
|
||||
|
||||
LEDs
|
||||
|
||||
-->
|
||||
|
||||
Buzzer
|
||||
|
||||
-->
|
||||
|
||||

|
||||
|
||||
Activity Demonstration
|
||||
Activity Demonstration
|
||||
|
||||
### Setup
|
||||
|
||||
Construct mazes with any solid material that is tall enough for the rover IR & ultrasonic sensors to detect. We use boxes or wooden blocks to create our walls. The width of maze pathways will change how difficult the maze will be. For a challenging maze create pathways with 5-10cm allowance from each side of rover to the wall. The larger the width the easier.
|
||||
|
||||
To add complexity to mazes create additional tasks for students to complete in the maze. E.g. use coloured floor tiles or tape on your maze floor and task them to find all colour sections in the maze before they can finish or change speed at different colours.
|
||||
Construct mazes with any solid material that is tall enough for the rover IR & ultrasonic sensors to detect. We use boxes or wooden blocks to create our walls. For this first level, keep pathways wide with at least 15cm clearance on each side of the rover to make it easier for students to get started.
|
||||
|
||||
### Here’s Our Approach
|
||||
|
||||
Solutions to maze challenges can vary in intricacy depending on rovers sensors utilized and maze complexity. Our basic approach only involves the ultrasonic sensor and the left IR sensor.
|
||||
This basic approach only involves the ultrasonic sensor and the left IR sensor.
|
||||
|
||||
#### Stage 1
|
||||
|
||||
We start by creating a variable named wall which represents the distance (cm) from the side of our rover to the maze wall when the rover is placed in the middle of a maze path.
|
||||
|
||||
#### **Stage 2**
|
||||
#### Stage 2
|
||||
|
||||
With an IF/ELSE IF/ELSE block we first check if the rover can move forward. If the ultrasonic sensor doesn't detect anything closer than our wall variable it will move forward. If it did not pass this check, it means there is a wall in the way and it now has to decide where to turn.
|
||||
With an IF/ELSE IF/ELSE block we first check if the rover can move forward. If the ultrasonic sensor doesn’t detect anything closer than our wall variable it will move forward. If it did not pass this check, it means there is a wall in the way and it now has to decide where to turn.
|
||||
|
||||
#### **Stage 3**
|
||||
#### Stage 3
|
||||
|
||||
Our next case, the ELSE IF, will check if the left IR sensor detects a wall. If it doesn't, the way is clear & it will turn left. If it does detect a wall, it will go to the ELSE case and turn right. We then place the whole IF/ELSE IF/ELSE block in a while true loop so it will repeat this behaviour indefinitely.
|
||||
Our next case, the ELSE IF, will check if the left IR sensor detects a wall. If it doesn’t, the way is clear & it will turn left. If it does detect a wall, it will go to the ELSE case and turn right. We then place the whole IF/ELSE IF/ELSE block in a while true loop so it will repeat this behaviour indefinitely.
|
||||
|
||||

|
||||
|
||||
Example Code
|
||||
|
||||
### Up Next
|
||||
|
||||
Ready for a harder maze? In Maze II you’ll use both IR sensors and the ultrasonic sensor together to handle more complex maze layouts.
|
||||
|
||||
[Activity: Maze II](/resources/maze-ii)
|
||||
|
||||
[Activity: Maze III](/resources/maze-iii)
|
||||
|
||||
Reference in New Issue
Block a user