5. control structures. if (nested ifs) statments, for loops.
method overloading.
I'm just going to start listing ideas, pick one for the lab, and
use the others as potential projects.
*)
test if a given sensor is a light sensor.
loop through, taking readings, and if there is an average
reading of something more than 1, it means that there COULD
be a light sensor attached. Test it with a rotation or
a temperature sensor. Both, i believe, should give non-zero
values. During "normal" operation. You need to check if
the average is > 1 b/c the values can be "noisy". You can
get some very minimal readings even if there aren't sensors
attached.
*)
A subsumption based program - line follower, obstacle
avoider could work here. This would be a harder lab.
*)
For method overloading, have the base sensor class, and
then a readValue for a TouchSensor reads boolean values,
while light sensor reads percentage values.
*)
A display method, which takes different types of sensors, or
motor, and displays info about that object.
*)
Scrolling text on the lcd
© 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.