Files
micromelon-website/content/resources/sumo.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

53 lines
2.6 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: Sumo I"
date: "2021-06-03"
categories: ["Activities", "Simulator Activities"]
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "Motors", "Beginner"]
codingSkills: ["Branching", "Iteration", "Algorithm Design"]
roverConcepts: ["Colour", "Ultrasonic", "Motors"]
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. 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.
### 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
The sumo exercise works best with a circular arena but any shape can work. The edges of the arena should be a clear contrast to the body of the arena so rovers can use colour sensors to detect when they are at the edge. We recommend the arena be 60-100cm in diameter with a 3-5cm edge. There are many variations of rules available online.
**The Quick & Easy Setup**
Use a desk as the arena floor and make the arena circle with coloured tape.
### Heres Our Approach
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
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
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)