7

I'm working on a project with multiple axis of movement… trying to get two motors to run at the same time in order to achieve a mix of two!

  • Can you describe the result you're trying to achieve? I don't understand the "mix of two" part. – pcantin Nov 22 '13 at 2:41
  • 1
    I'm building a robot that will draw specific lines on a popsicle stick. The stick is on a table that moves up and down. The pen is attached to something that makes it move left and right, forward and back. I can achieve a straight line… but for a diagonal line I have run into trouble. – Melanie Nov 22 '13 at 2:53
2

In NXT-G if you place a block after another block it will run in succession. To get two motors running at the same time you can place two motor blocks, one at the start and the other just above or below. Drag the sequence beam (the white Technic beam) to the second block to complete the circuit.

Don't forget to make sure the motor blocks are controlling separate ports and that both ports on the NXT brick are attached to motors.

You could just use one block to control the two ports but they would both have to be running in the same direction.

2

If you want two things to run at the same time place the first just in front of but not touching the start block and the other just below the first. Click on the joiners (grey ovals on the end where blocks join) and press wire from here and tap on the first code. Do the same with the second. enter image description here

1

It depends on the programming language, but assuming you're using NXT-G then the Move block may be sufficient. The Move block is designed to coordinate 2 motors so that they both rotate at the same speed over a distance. The Move block has settings for speed/power of the motion. There is a forward/backward setting. There is also a steering setting, which is implemented as a slider bar giving about 20 ratios of motor output.

Setting speed to 75, forward and steering = 0 should give you a diagonal line.

Change the steering to something +- 100 to give other diagonal lines.

To give straight horizontal or vertical lines, turn one motor off, the other on.

  • Both answers helped, thanks! It was just a little thing I had to change in the command… now to get the exact angle of diagonal I want is a whole other story :P – Melanie Nov 23 '13 at 2:50
0

do 2 starts. From the orange. :)

  • 1
    Hi krisblom! I believe you have the correct answer, but it would be much nicer if you could flesh it out a bit better. E.g. by including detailed steps, maybe screenshots, etc. – zovits Apr 12 '16 at 17:37

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.