Part III Add a Rotation Sensor to the Roverbot:
By knowing the circumference of the large wheels, we should
then be able to calculate how many rotations they make in
a given inch traveled:
Calculations:
Circumference of large wheels = _______________ inches
Rotations = ____________ * inches traveled
Inches traveled = ___________ * Rotations
Connect a rotation sensor to one of the axles of the large Roverbot wheels.
Calibrate the rotation sensor to determine how the rotation count relates to the distance traveled by your Roverbot.
You can put a command in your program to display the rotation count in the RCX window. You will probably have to devise some sort of table like we made earlier to verify your calibration. Use the Help command in the Programming software to see how to program with a sensor. Be sure to reset your rotation sensor at the beginning of your program. Also you need to know that the rotation count increases by 16 for every full rotation of the axle. Record your findings on a piece of notebook paper.
Once you have determined how the rotation sensor reading is related to the distance traveled, try out the remote control that comes with the your Mindstorms kit. You can send a message from the remote control to the Roverbot. The message can only be 1, 2 or 3.
Write a program to do the following:
Rest until a message is received from the remote control. Then travel for a number of rotations equal to 10 times the message number. (That is, rotation count on the sensor).
Record your results: