Good question. To answer your question yes there is. First let me give a little I do on the LEGO motors. You may know someone of this but I’d like to explain it to clear any confusion. In short they are continuous servos. This means they can turn in any direction indefinitely. Servos are basically motors with a bunch of gears and an encoder that tells the servos current position. With continuous servos they always start at position 0 or zero degrees. You should also use
BP.offset_motor_encoder(BP.get_motor_encoder(port)) before moving the motor just to be sure. Anyways as stated previously it is at position zero. If I tell it to go to position 90 with
That moves the motor to position 90. But what if you run it again? Try it. You’ll see that nothing happens because it is already at position 90. No if your offset the encoder again it and tell it to got to position 90 it will. However the proper way is just to tell it to go 180 degrees. Now try telling replacing the 90 with a zero. It should got backwards to the original position. Does this help? I would recommend reading the documentation for the BrickPi3. Just type
pydoc brickpi3 in the terminal and use the arrow keys to skim through it. That will give you a general idea on what can be done with the BrickPi3. The documentation isn’t that long.
Please ask if you didn’t understamd my explanation.