2

I've started to build a robot, but when it drives it veers off to the left even though I'm just telling it to go straight. I think I need to do something to the motors but I don't know what or how. I'm programming an NXT block.

Overhead shot Side shot

  • 1
    Hi Donna! Could you please tell (or even show) us more about your robot and its program? The best would be if you attached a photo of the robot and a screenshot of the program, but even a textual description would allow us to help you better. – zovits Mar 27 at 12:27
  • 1
    Hi Zovits! Here's the program: task main() { TextOut(0,LCD_LINE1, "HELLO GENIE"); Wait(SEC_3); OnFwd(OUT_AB, 30); Wait(SEC_3); } But I don't know how to put the pictures in. – Donna Walters Mar 27 at 13:24
  • 1
    This page in the Help section describes how can one embed images: bricks.stackexchange.com/help/formatting The program seems to be correct, and if assume that (1) the two drive motors are connected to the A and B ports and (2) use the same gearing to drive (3) wheels with the same diameters (4) with no mechanical blockages or friction then the robot should indeed go straight. Can you please verify these four assumptions? – zovits Mar 27 at 14:05
  • Add picture to original post, as far as I know your assumptions are correct. However I did wondered if one of the motors could be running slightly slower then the other as in a text book I have says that you might have to sink them so they run identity? – Donna Walters Mar 27 at 14:44
  • If that is the case you could try using the OnFwdSync command to eliminate another possible source of the error. – zovits Mar 28 at 13:06

Your Answer

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

Browse other questions tagged or ask your own question.