4. methods/classes. functions. return. parameters
lab: Make it so that main creates an instance of that robot.
Create methods which turn the robot right, or left. Which
go forward x distance.
Have the robot go in a square. Useing different tires.
Shows how friction and such affects the actual distance
travelled, and actually getting it to return to where it
started is a harder problem that one might first realize.
Or, if you want, add a sensor, and a SensorListener class.
Have it backup, or go forward on a specific event. For
example the obstacle avoider (call back up and turn on sensor
activation).
projects:
Use a rotation sensor to see how far the robot has gone
in a standard distance.
Use this to try to improve the robot going in a square.
Make a method to return the battery mV value.
Make a method to have the RCX go forward, on the test pad,
and count the number of green squares.
© Copyright 2000 By Joel Adams, Ryan VanderBijl.
Lisenced under the GPL. You may use it, but we would like you to
share any ideas, etc with us and the world.