170 likes | 603 Vues
Robot Sumo. 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.”.
E N D
What is Sumo? “Sumois 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
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ō.
A simple remote control To begin the NXT Sumo experience, build a simple remote control for the EduBot. An example one is shown – don’t make it complicated!
Repeat (loop) Wait for Touch Sensor in Port 1 to be pressed. Wait for Touch Sensor in Port 1 to be released. Turn motors off. Turn motors on. Beginning Programming 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.
Repeat (loop) Wait for Touch Sensor in Port 1 to be pressed. Wait for Touch Sensor in Port 1 to be released. Turn motors off. Turn motors on. Turning the Flow Chart into a program
Control both motors . . . A similar program can be written for each individual motor. Touch Sensor 1 controls left motor. Touch Sensor 2 controls right motor. The remote control will be able to turn the Robot when only one touch sensor is pressed (ie. only one motor activates).
Repeat Repeat Wait for Touch Sensor Port 1 to be pressed. Wait for Touch Sensor Port 2 to be pressed. Wait for Touch Sensor Port 1 to be released. Wait for Touch Sensor Port . Turn left motor off. Turn right motor off. Turn left motor on. Turn right motor on. Control both motors . . . Flowchart for controlling different motors with individual Touch Sensors Touch Sensor 1 controls left motor. Touch Sensor 2 controls right motor.
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.
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.