Hello, I am having a problem with the motorRotateDegree function. When I run the Multi_Motor_Encoder_Test.py file, It runs the first portion with just the motor of Port A alright, but when it runs the part of the code where both motors should be running, only the motor in port B runs.
Why would Port A not be working.
I’m guessing the issue is that the code never resets the encoders.
Try this code:
from BrickPi import *
BrickPi.offset_motor_encoder = BrickPi.encoder[PORT_A]
BrickPi.offset_motor_encoder = BrickPi.encoder[PORT_B]
That should run both motors.
Thanks… I have not had a chance to try it I will try it asap.
What exactly does the encoder do?
The encoder is a sensor built into the Lego Mindstorms NXT and EV3 motors. It provides position/speed feedback so the motor can be precisely and accurately controlled.