I'm trying do make simple program. Two motors, two touch sensors. Sensor one increases speed, sensor two decreases.
The whole program works very well but only with one sensor. When I put some logic that has "Wait for sensor two" brick it just fools around.
The algorithm is very simple:
- Variable
i
- counts times sensors being pressed - Variable
Znak
(eng. sign) causes variablei
to decrease if negative or increase if positive. - Motor speed is calculated by multiplying
i
by 10.
How can I solve this kind of problem?