Anstoßen mit
SensorListeners
u import
josx.platform.rcx.*;
class CollisionDetector implements SensorListener {
public void stateChanged
(Sensor s, int oldVal, int newVal) {
if( (newVal > 80) && (oldVal < 80) ) {
synchronized(s) {
s.notifyAll();
}
}
}
}