EducateNXT
Robot Sumo
EducateNXT
What is Sumo?
“Sumo is a competitive contact sport where a wrestler (rikishi) attempts to force another wrestler out of a circular ring (dohyō) or to touch the ground with anything other than the soles of the feet.”
Photo and definition from Wikipedia http://en.wikipedia.org/wiki/Sumo, accessed 22/1/10
EducateNXT
What is Robot Sumo?
A robot attempts to push another robot out of the dohyō (ring) or knock the other robot over. To win, a robot must also stay within the dohyō.
EducateNXT
The Doyho
EducateNXT
A simple remote controlTo begin the NXT Sumo experience, build a simple remote control for the EduBot.
An example one is shown – don’t make it complicated!
EducateNXT
Beginning Programming
Wait for Touch Sensor in Port 1 to be pressed.
Turn motors on.
Wait for Touch Sensor in Port 1 to be released.
Turn motors off.
Repeat (loop)
Programming starts with a flowchart.
Flowcharts are used by programmers to represent possible steps and scenarios in actual programs.
The following flowchart is designed to program the EduBot to move forward when the Remote Control Touch sensor in Port
1 is pressed and stop when it is pressed again.
EducateNXT
Turning the Flow Chart into a program
Wait for Touch Sensor in Port 1 to be pressed.
Turn motors on.
Wait for Touch Sensor in Port 1 to be released.
Turn motors off.
Repeat (loop)
EducateNXT
A similar program can be written for each individual motor.
Control both motors . . .
The remote control will be able to turn the Robot when only one
touch sensor is pressed (ie. only one motor activates).
Touch Sensor 1 controls left motor.
Touch Sensor 2 controls right motor.
EducateNXT
Control both motors . . .
Wait for Touch
Sensor Port 1 to be
pressed.
Turn left motor on.
Wait for Touch
Sensor Port 1 to be
released.
Turn left motor off.
Repeat
Touch Sensor 1 controls left motor.
Touch Sensor 2 controls right motor.
Wait for Touch
Sensor Port 2 to be
pressed.
Turn right motor on.
Wait for Touch
Sensor Port .
Turn right motor off.
Repeat
Flowchart for controlling different motors with individual Touch Sensors
EducateNXT
Quick refresh on parallel tasking
Both the left and right controllers need to work at the same time, so we will need to “parallel task.”
This requires creating a separate branch in NXT-G.
EducateNXT
Control both motors . . .Fill in the blanks in your program.
Off to the dohyō to test your program and begin battle.
Answers revealed when mouse clicked.
EducateNXT