I have a major problem, I have no idea how to make my motors run without exhaustive hardware polling.
the following pseudo-code;
while (!touch.isPressed()) {
Motor.forward();
}
.. is just painful to implement, and I won't do it. How is the Motor.A.forward()-method supposed to work?? If Motor.A.forward() is all you write in a program, it will terminate immediately.
So I would guess Listeners would be a good solution, I haven't really used listeners much, so I don't know the syntax, but how would you implement the following pseudo-code?;
Motor.forward();
until
TouchSensor.isPressed();
fairly straight forward I think. If you know a different way of implementing this without listeners that would be welcome too.
thanx!!!!
