Robot only move straight with no turn(which is what they want). If I remove the turning code(2nd set of three lines) the robot behaves as it should (go straight for 4 seconds). Once I put the code back in line it runs for approximately 6 seconds. No idea what the issue is. Please help.

Thank you very much.

Josh

Thu Jan 17, 2013 9:57 am

JohnWatson

Site Admin

Joined: Thu May 24, 2012 12:15 pmPosts: 722

Re: Cannot seem to solve this issue. Please help.

What happens when you replace the 850 millisecond wait with a longer period of time (say, 2000 milliseconds)? Does the robot turn correctly then? The only thing I can think of is that the wait command is not long enough for motor C to 'push through' the additional friction of motor B being stopped. On that note, I tried the code you have posted on an NXT bot with a fresh battery (REMBot) and it worked correctly; double check the battery level of the NXT to see if it is low, and if so, I would suggest charging it fully and re-testing the code.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum