Use two motors simultaneously

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Use two motors simultaneously

Postby airglide » Sun Mar 04, 2012 11:27 pm

Hello everyone,

It might sound a bit too easy for you, but I'm newbie in programming robots.
I have the Problem, that I want to program a path which the robot should follow. I don't know how I can write, how far the robot should go, I can use the method rotate() but I couldn't figure out how i can use this method simultaneously on two motors.

The other way I thought It would function is, that I use the method forward(), but there I don't know how I can control the time and the rotations.

thank you for your help
airglide
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: Use two motors simultaneously

Postby Aswin » Sun Mar 04, 2012 11:59 pm

Hi,

Try to do the guide on motors, it is just two clicks away from the Lejos homepage.
There also is a navigotor class that has a lot of functionally to move a robot. It can save you a lot of work. Still, do the motor tutorial first.
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 197
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Use two motors simultaneously

Postby airglide » Mon Mar 05, 2012 4:22 pm

Hi Aswin,

thank you for your answer, I've found my fault. I thought 2000 ms are 20 seconds :P quiet embarassing :D :D
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 5 guests

more stuff