Rescue Workshop
The following examples will lead you through from the basics to more
advanced techniques needed to help navigate the new Rescue Field.
Note: These are only examples and not the only way to
successfully navigate the new rescue fields.
Basic Line Following
This line follower code actually follows the line when the
sensors are close together.
The robot will wriggle its way along the line alternating between
driving forward with the left hand motor (turning right) until the left
hand sensor goes dark. The left hand motor is then stopped and the right
hand motor drives forward turning the robot left until the right hand
sensor goes black and so on.
Note: This code should also work for the NXT by changing the Start icon
and the sensor icons to NXT compatible icons.
Stop on Green
This code is the first step to teaching the robot to detect green.
Note: Sensors should be set between 2 and 2.5cm apart.
The purpose of this code is to test to see if the robot detects the
presence of the green square on either side of the line. When the green
square is detected the robot stops.
RCX - Turn on Green
This code extends the above code so that the robot will now turn when a green square is detected and then continue on.
NXT - Turn on Green
This code applies the above logic to the NXT.
NXT - Find Victim
When the robot enters the chemical spill (green end tile) it needs to detect the victim (foil covered can), it then needs to push the victim out of the chemical spill to safety.