2

I have the Lego Mindstorms EV3 Pack and built a simple car with 3 wheels. The back whels are motorized.

When I run the following code:

Motor.A.backward();
Motor.D.Backward(); 

both motors are rotating in different directions. I could understand if backward needs to be interpreted as forward. But how come that the motors are behaving differently?

It is basically not a big drama, I could build a wrapper to handle this. But still: When I want to use a chassis implementation, I would maybe run into that problem?

2

The "forward" and "backward" expressions are only interpreted in the reference frames of the motors themselves and translate to clockwise and counter-clockwise. In your case you must have mounted the motors in a way which requires them to rotate in different directions in order to propel the vehicle.

Consider a car with four wheels: in order to go forward, the wheels on the left hand side need to rotate counter-clockwise but those on the right side must turn clockwise.

While most chassis types share this property, it is indeed possible to build a chassis that requires both motors to be driven in the same direction for the vehicle to advance. In that case the program must be adjusted to accommodate for that.

  • thank you for the reply. I solved that Issue by simply turning and reassembling one motor. So now its fine:-) – weiterleiter Mar 7 at 21:24
  • You are welcome! On this site if you feel an answer has helped you you can click on the upward pointing triangle to show your appreciation and if an answer has proven to solve the problem at hand, you can signal it by clicking the check mark next to it. This will tell other readers that the solution offered is indeed correct. – zovits Mar 8 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.