Take the 2-minute tour ×
LEGO® Answers is a question and answer site for LEGO® and building block enthusiasts. It's 100% free, no registration required.

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!

share|improve this question
    
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
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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