I'm interested in mimicking the functionality of the Arqball Spin, at $60 it isn't cheap so I'd like to make the most out of my Mindstorms parts.

I'd like to use NXT-G to program a motor to rotate 360° in 20 seconds. NXT-G can only controll the power of the motor and duration (Unlimited, Degrees, Rotations & Seconds). The power of the motor can be set from 0 to 100 seemingly arbitrary values:

enter image description here

I don't mind using 3rd party software to program the motor, provided it's easy to use.

  • 1
    Do you have access to the Rotation Sensor at all? You might be able to do some internal calibration prior to the main run? Jul 24, 2012 at 11:15
  • 1
    @Zhaph-BenDuguid Yes, I do, but it hasn't helped much. My motor is weak at low power (4-12-ish), it would turn at a reliable speed so I increased the power of the motor and added a small gear to power a larger one.
    – Ambo100
    Jul 25, 2012 at 20:24

1 Answer 1


The problem can be restated: 360 / 20 = 18 deg / sec = 1 deg / .056 sec

One degree is the smallest increment provided by the rotation sensors.

NXT-G has a timer sensor with 1/100th second resolution.

In pseudo-code:

Set a motorPower variable to 10
Start a timer
Loop until rotationDegrees >= 360
    If timeElapsed * 18 > rotationSensorDegrees
        motorPower = motorPower - 1
        motorPower = motorPower + 1
    End If
    MoveBlock (power = motorPower)
End Loop
MoveBlock (stop)

Of course, use of the 8 tooth and 40 tooth gears to give a 5 to 1 reduction would give even better results. Even the best programming will have trouble offsetting bad mechanics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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