I would some need help with how I get some wheels to spin around not just one lap but several laps until I give the signal that they should stand still and it should also be possible to control which direction the wheels should spin so they can easily change direction on rotation.
x = 1
servo = comp.findBehaviour("ServoController")
spinningSignal = comp.findBehaviour("BooleanSignal#1")
spinningSignal_reverse = comp.findBehaviour("BooleanSignal#2")
while app.Simulation.IsRunning:
delay(0.01)
while spinningSignal.Value == True:
servo.move(x)
x = x + 1
while spinningSignal_reverse.Value == True:
servo.move(-x)
x = x - 1
I’m no expert at Python myself, but i would try something like this.