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:
Tim Hadwen
2026-03-01 23:56:05 +10:00
parent 1dd622cbf5
commit 99534e779a
31 changed files with 853 additions and 1199 deletions

View File

@@ -1,55 +1,17 @@
---
title: "Activity: Sumo"
title: "Activity: Sumo I"
date: "2021-06-03"
categories: ["Activities", "All", "Simulator Activities"]
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Advanced"]
excerpt: "Learn branching, iteration, algorithm design, and how to use the Rovers motors, colour, ultrasonic, and IR sensors."
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "Motors", "Beginner"]
excerpt: "Learn the basics of sumo by programming your rover to stay in the ring and push opponents out using the colour and ultrasonic sensors."
featuredImage: "/images/resources/sumo.png"
---
A classic robotics competition challenge. Have your rovers battle in the sumo ring. If a rover is disabled or leaves the ring for any reason it loses the match. There are many possible approaches to staying in the ring while pushing the opponent out. This challenge is a great opportunity to design attachments for your rovers.
A classic robotics competition challenge. Program your rover to stay inside the sumo ring and push opponents out. In this first level, youll use the colour sensor to detect the arena edge and the ultrasonic sensor to find your opponent.
####
Relevant Coding Skills
### Activity Demonstration
Branching
Iteration
Functions
Variables
--&gt;
Algorithm Design
Maths
####
Relevant Rover Concepts
Ultrasonic
IR
Colour
Gyroscope
Accelerometer
Motors
LEDs
--&gt;
Buzzer
--&gt;
Activity Demonstration
<iframe width="560" height="315" src="https://www.youtube.com/embed/RSoPCUywg20" title="Sumo Activity Demonstration" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
### Setup
@@ -61,20 +23,28 @@ Use a desk as the arena floor and make the arena circle with coloured tape.
### Heres Our Approach
Note that this is a simple approach that should be improved upon. Try different tactics and include sensors like IR and Accelerometer to better find and push your opponent.
This is a simple approach using just the colour sensor and ultrasonic sensor to get you started.
#### Stage 1: Stay Away From The Edge
First we will add a repeat while true loop as we want our code to run continuously. We can then use an IF statement to move backward and turn around if the colour sensor detects the edge of the ring.
#### **Stage 2: Move Around The Ring**
#### Stage 2: Move Around The Ring
If the robot doesnt detect the edge it should move in search of the opponent. We can use the ELSE part of the IF statement to move forward.
#### **Stage 3: Push The Opponent**
#### Stage 3: Push The Opponent
Staying in the ring is most important. After checking for the edge, we can use an ELSE IF (ELIF) in the IF statement to detect if an opponent is in front with the ultrasonic sensor. If it is close use a motor block to set our motors to full speed to charge the opponent.
![](/images/content/1fb1c4-screenshot-2023-05-24-123918.png)
Example Code
### Up Next
Ready to improve your sumo algorithm? In Sumo II youll add IR sensors to detect opponents from the sides and create smarter search patterns.
[Activity: Sumo II](/resources/sumo-ii)
[Activity: Sumo III](/resources/sumo-iii)