Build Your Kit page and full Micromelon website
Complete website build including: - Build Your Kit store page with cart system, sectioned layout (Hardware, Software, Attachments, Spare Parts), inline quote request form, and sticky sidebar summary - 16+ pages: Education, Platform, Resources, News, About Us, Download, Contact, Rover, Code Editor, Robot Simulator, etc. - 89+ MDX resource articles and 18 news posts - Store product images scraped from micromelon.com.au - Quote request API route with Airtable integration - Dynamic back links and cover photos on resource pages - Redesigned downloads page - Fixed corrupted MDX code blocks
This commit is contained in:
144
content/resources/prison-escape.mdx
Normal file
144
content/resources/prison-escape.mdx
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
title: "Activity: Prison Escape"
|
||||
date: "2021-06-03"
|
||||
categories: ["Activities", "All"]
|
||||
tags: ["Colour Sensors", "Branching", "Iteration", "Motors", "Intermediate"]
|
||||
excerpt: "Learn branching and iteration using the colour sensors and motors."
|
||||
featuredImage: "/images/resources/prison-escape.png"
|
||||
---
|
||||
|
||||
** | **
|
||||
|
||||
Use the colour sensors to find and drive through the gap in the box. Rovers start in the middle facing a random direction and must leave through the gap, they cannot drive over the lines.
|
||||
|
||||
####
|
||||
Relevant Coding Skills
|
||||
|
||||
Branching
|
||||
|
||||
Iteration
|
||||
|
||||
Functions
|
||||
|
||||
Variables
|
||||
|
||||
-->
|
||||
|
||||
Algorithm Design
|
||||
|
||||
-->
|
||||
|
||||
Maths
|
||||
|
||||
####
|
||||
Relevant Rover Concepts
|
||||
|
||||
Ultrasonic
|
||||
|
||||
-->
|
||||
|
||||
IR
|
||||
|
||||
-->
|
||||
|
||||
Colour
|
||||
|
||||
Gyroscope
|
||||
|
||||
Accelerometer
|
||||
|
||||
Motors
|
||||
|
||||
LEDs
|
||||
|
||||
-->
|
||||
|
||||
Buzzer
|
||||
|
||||
-->
|
||||
|
||||
Activity Demonstration
|
||||
|
||||
### Setup
|
||||
|
||||
Use tape on a table or floor or a printed arena to create an outline. It doesn't matter what colour the tape or surface is as long as they contrast to make it easy to detect with the colour sensors. Make sure the gap you leave in the wall is large enough for the rover the move through.
|
||||
|
||||
The same code should work no matter where the rover is placed to start. Do not hard code all distances in your solution.
|
||||
|
||||
### Here’s Our Approach
|
||||
|
||||
There are multiple ways to solve this challenge. This starter approach simply moves the rover forward until it detects the wall. If we detect the wall it means we must reverse and change direction. This cycle repeats until the rover finds the exit. You can add randomness to the turning or some other strategy to find the exit faster.
|
||||
|
||||
#### Stage 1
|
||||
|
||||
Use an IF Statement block with a condition that checks if the colour sensor sees the tape which is brighter than the floor. If the rover does detect the tape is underneath it, it knows it has hit a wall. We use motor blocks to go backward then turn.
|
||||
|
||||
#### **Stage 2**
|
||||
|
||||
When our rover does not see the tape we must just use a motor block to set the rover to move forward slowly in the ELSE branch.
|
||||
|
||||
#### **Stage 3**
|
||||
|
||||
We want to repeat this behaviour until the rover finds the exit so we put all our code in a repeat while true loop.
|
||||
|
||||

|
||||
|
||||
Example Code
|
||||
|
||||
### Related Posts
|
||||
|
||||
Resources
|
||||
|
||||
[
|
||||
|
||||

|
||||
|
||||
](/resources/creating-a-sumo-unit)
|
||||
|
||||
[All](/resources?category=All)
|
||||
|
||||
[Creating A Sumo Unit For Your Digital Technologies Class](/resources/creating-a-sumo-unit)
|
||||
|
||||
[All](/resources?category=All)
|
||||
|
||||
How to run a sumo unit in your digital technologies classroom.
|
||||
|
||||
[Read More →](/resources/creating-a-sumo-unit)
|
||||
|
||||
[All](/resources?category=All)
|
||||
|
||||
[
|
||||
|
||||

|
||||
|
||||
](/resources/ultrasonic-sensor)
|
||||
|
||||
[All](/resources?category=All), [Guides](/resources?category=Guides)
|
||||
|
||||
[The Ultrasonic Sensor](/resources/ultrasonic-sensor)
|
||||
|
||||
[All](/resources?category=All), [Guides](/resources?category=Guides)
|
||||
|
||||
Learn all about the ultrasonic sensor!
|
||||
|
||||
[Read More →](/resources/ultrasonic-sensor)
|
||||
|
||||
[All](/resources?category=All), [Guides](/resources?category=Guides)
|
||||
|
||||
[
|
||||
|
||||

|
||||
|
||||
](/resources/year-7-digital-tech-at-st-peters)
|
||||
|
||||
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)
|
||||
|
||||
[Case Study: Year 7 Digital Tech at St Peters Lutheran College](/resources/year-7-digital-tech-at-st-peters)
|
||||
|
||||
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)
|
||||
|
||||
See how Meg Foley at St Peters conducted a challenge for their Year 7s using Micromelon.
|
||||
|
||||
[Read More →](/resources/year-7-digital-tech-at-st-peters)
|
||||
|
||||
[All](/resources?category=All), [Customer Stories](/resources?category=Customer+Stories)
|
||||
Reference in New Issue
Block a user