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:
40
content/resources/sumo-ii.mdx
Normal file
40
content/resources/sumo-ii.mdx
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: "Activity: Sumo II"
|
||||
date: "2021-06-04"
|
||||
categories: ["Activities", "All", "Simulator Activities"]
|
||||
tags: ["Colour Sensors", "Branching", "Iteration", "Algorithm Design", "Ultrasonic", "IR", "Motors", "Intermediate"]
|
||||
excerpt: "Improve your sumo algorithm by adding IR sensors to detect opponents from the sides and implementing smarter search patterns."
|
||||
featuredImage: "/images/resources/sumo.png"
|
||||
---
|
||||
|
||||
Level up your sumo robot. In this intermediate challenge, you'll add the IR distance sensors to detect opponents from multiple directions and create a smarter search pattern to find and engage your opponent faster.
|
||||
|
||||
Activity Demonstration
|
||||
|
||||
### Setup
|
||||
|
||||
Use the same sumo arena setup as Sumo I. A circular arena with clear edge markings, 60-100cm in diameter.
|
||||
|
||||
### Building On Sumo I
|
||||
|
||||
In Sumo I we used the colour sensor to avoid the edge and the ultrasonic sensor to detect opponents ahead. This works, but the rover can only find opponents directly in front of it. By adding the IR sensors we can detect opponents to the left and right as well.
|
||||
|
||||
#### Stage 1: Add IR Sensor Detection
|
||||
|
||||
After checking for the arena edge with the colour sensor, add ELSE IF conditions to check the left and right IR sensors. If an opponent is detected to the left, turn left and charge. If detected to the right, turn right and charge. This gives the rover a much wider detection range.
|
||||
|
||||
#### Stage 2: Smarter Search Pattern
|
||||
|
||||
Instead of just driving forward when no opponent is detected, implement a search pattern. Spin slowly on the spot while checking all three distance sensors. Once an opponent is detected in any direction, turn to face them and charge at full speed.
|
||||
|
||||
#### Stage 3: Edge Recovery
|
||||
|
||||
Improve the edge avoidance behaviour. Instead of just reversing and turning a fixed amount, reverse and then spin to scan for the opponent before moving forward again. This prevents the rover from wasting time after hitting the edge.
|
||||
|
||||
### Up Next
|
||||
|
||||
Ready for advanced sumo? In Sumo III you'll use the gyroscope and accelerometer for precise control and defensive strategies.
|
||||
|
||||
[Activity: Sumo I](/resources/sumo)
|
||||
|
||||
[Activity: Sumo III](/resources/sumo-iii)
|
||||
Reference in New Issue
Block a user