- Start the Robolab software
- Select the Programmer Option
- Double click on "Pilot 1"
- Set Motor A in --> direction
- Keep the wait-time at 4 seconds
- Download the program to the RCX
- Run the program and see what happens.
- Explain the behavior of the robot. (keep good notes that you
will include in your Web report tonight.)
- Back with the Pilot 1 program, change the direction
of the rotation of Motor A.
- Keep the wait-time at 4 seconds.
- Download the program and test it. How is the behavior
Obersving the influence of the connectors:
- Lift the connector linking the motor to the RCX from Port A.
- Rotate it by 90 degrees, and connect it back.
- Run the program again.
- Perform this rotation of the connector a few times and observe the
behavior of the Pathfinder. How does the connection affect the
rotation of the motor?
EXERCISE: Think of a way to use the Pilot 1 program and
make both motors turn. Think carefully, this is a tricky problem!
EXERCISE: Figure out a way to make the robot go straight.
Last experiments with the Pilot 1 program:
- Modify the program and choose different wait times.
- Download each variation of the program in the RCX and
test each one out.
Go back to the window that shows the menu of the Pilot programs,
and double-click on Pilot 2.
- Use two motors, going in the same direction, both with power set to 1.
- Use a 2-second wait time.
- Download the program and test it out.
- Set Motor A to Power 1, and Motor C to Power 3.
- Download and test the program. What do you observe?
- Set the motors to turn in the opposite direction of their
- Download and test the new program. Do you observe the same
curving of the robot?
- Replace the Wait-tile by the touch sensor with the arrow facing in.
This means that the program will wait at that tile until the touch
sensor is pressed (i.e. until it hits an obstacle).
- Download the new program and test it by holding the robot in
your hands, wheels going freely in the air. Then use your fingers to
activate/deactivate the touch sensor.
- Record your observations.
- Replace the touch sensor with the arrow going in with the
touch sensor with the arrow going out.
- Test the new program out.
Go back to the main menu and double-click on Pilot 3.
- Set Motor A to Power 3, Motor C to Power 3, followed by a wait of 2 seconds.
Set the second set of motor tiles to Power 5 for A, Power 3 for C, followed
by a final wait tile of 1 second.
- Download the program and try it out.
- Change the "one run" tile to a "continous loop" tile.
- Download and test the new program.
EXERCISE: Modify the program so that your pathfinder robot
goes around the floor following a square path.
EXERCISE: Modify your solution program for the last exercise
so that your robot goes in a square path in the opposite
Move to the hallway.
Using masking tape, mark the borders of a square on the
floor containing 4 tiles (2 tiles by 2 tiles).
Using additional masking tape,
mark a larger square containing the smaller one, and such
that the larger square contains 9 tiles (3 tiles by 3 tiles).
Tune your program so that your Pathfinder robot will
go around the small masking-taped square and inside the
large masking-taped square without ever going over the
Go back to the main menu and double-click on Pilot 4.
This time the program consists of two steps. You can move from
one step to the next by using the red arrows on each side of the
program box. You can also add or remove steps (blocks of 4 tiles)
by clickin on the plus and minus boxes. Do not hesitate to refer to
the Robolab brochure for additional information as you are
doing this part of the lab.
- First, modify your Pathfinder robot so that it has a light
sensor connected to it. Make the light sensor "look" down,
about a quarter inch off the ground. The photo
below shows one possible implementation.
- In the first step of the program,
set Motors A and C to Power 3, and
set the light sensor values to
less (<) than
50. In the second step make the motors stop, and finish with
wait tile for a random time less than one second.
- Download your program. Use the folded cardboard sheet that has
an oval back track drawn on it, and put your pathfinder in the middle
of the oval. Start the Pathfinder. What do you observe? What is the
function of the light sensor tile set to "< 50"?
- Modify the program so that the light sensor settings are "> 50.
Test your program and figure out what the funcion of the tile is
with the new setting.
EXERCISE: Make your Pathfinder start in the middle of the black oval,
go straight until it finds the black line, stop at the black line,
and reverse direction while turning. Make this last phase of
going backward last a second or two only.
EXERCISE: Modify your previous program so that the Pathfinder
keeps on going around, going straight until it finds the black line,
backing up while turning every time it encounters the black line, and
then resuming going straight.
% cp webpageskel.htm lab2.htm
% chmod a+r lab2.htm
% emacs lab2.htm
Make sure the page contains the following
When your page is finish, check that it is accessible from the
class Web page, at http://cs.smith.edu/~100e. Go to the Student Pages section and click on your account
number: your Web page should show up.
- your name
- the date
- Lab #2 as the title
- a picture of your team
- a short description of the afternoon lab
- the solution programs to two of the exercises. Choose the
exercises you enjoyed most, or those which you found most
challenging. When writing the programs, make up your
own simple programming language, as illustrated in this example:
Motor A, forward, power 3
Motor C, stop
Light sensor 1, go if less than 55
Wait 4 seconds