How can I calculate the required Motor MaxVelocity to move 2 motors from 0 degrees and 0 degrees to 90 degrees and 37 degrees so they reach their target angle at the same time?
✓ ANSWER ACCEPTED
How to calculate required MaxVelocity?
1 answer
✓ Accepted answer
First you'll want to know how many radians the motors must move instead of degrees, you can calculate this with the math.rad function:
local a1 = math.rad(90)
local a2 = math.rad(37)
If you would use these values as each Motors' MaxVelocity then they could move 90 degrees and 37 degrees every 60th of a second, so if we divide them by 60 they would move 90 degrees and 37 degrees in one second:
motor1.MaxVelocity = math.rad(90)/60
motor2.MaxVelocity = math.rad(37)/60
You can multiply the 60 by the amount of seconds that you want the rotations to take if you want more or less than one second:
local seconds = 4
local steps = seconds*60
motor1.MaxVelocity = math.rad(90)/steps
motor2.MaxVelocity = math.rad(37)/steps
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Any Code to show us what you're trying to do?