Functions | |
| int | GetRotationCount (Comm::NXTComm *comm, int port) |
| Returns the rotation of a motor. | |
| void | ResetRotationCount (Comm::NXTComm *comm, int port, bool relative) |
| Resets the specified motor's rotation count. | |
| void | SetForward (Comm::NXTComm *comm, int port, int power) |
| Sets a motor to turn forward at a specified power. | |
| void | SetReverse (Comm::NXTComm *comm, int port, int power) |
| Sets a motor to turn backward at a specified power. | |
| void | Stop (Comm::NXTComm *comm, int port, bool brake) |
| Tells a motor to stop turning. | |
| void | BrakeOn (Comm::NXTComm *comm, int port) |
| Tells a motor to turn the brake on. | |
| void | BrakeOff (Comm::NXTComm *comm, int port) |
| Tells a motor to turn the brake off. | |
| void | GoTo (Comm::NXTComm *comm, int port, int power, int tacho, bool brake) |
| Tells a motor to go to a certian angle and then stop. | |
| void NXT::Motor::BrakeOff | ( | Comm::NXTComm * | comm, | |
| int | port | |||
| ) |
Tells a motor to turn the brake off.
| port | The port that you wish to turn the brake off. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. |
| void NXT::Motor::BrakeOn | ( | Comm::NXTComm * | comm, | |
| int | port | |||
| ) |
Tells a motor to turn the brake on.
| port | The port that you wish to turn the brake on. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. |
| int NXT::Motor::GetRotationCount | ( | Comm::NXTComm * | comm, | |
| int | port | |||
| ) |
Returns the rotation of a motor.
| port | The port that you wish to retrieve the rotation. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. |
| void NXT::Motor::GoTo | ( | Comm::NXTComm * | comm, | |
| int | port, | |||
| int | power, | |||
| int | tacho, | |||
| bool | brake | |||
| ) |
Tells a motor to go to a certian angle and then stop.
| port | The port that you wish to set. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. | |
| power | The power level (0-100) that you want the motor to recieve. | |
| tacho | The rotation count (in degrees) that you want the motor to turn to. | |
| brake | Whether or not you want the motor to brake or float when it is done turning. |
| void NXT::Motor::ResetRotationCount | ( | Comm::NXTComm * | comm, | |
| int | port, | |||
| bool | relative | |||
| ) |
Resets the specified motor's rotation count.
| port | The port that you wish to reset the rotation. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. | |
| relative | If true it resets the rotation relative to the last movement. If false it resets the rotation to its absolute position. |
| void NXT::Motor::SetForward | ( | Comm::NXTComm * | comm, | |
| int | port, | |||
| int | power | |||
| ) |
Sets a motor to turn forward at a specified power.
| port | The port that you wish to set. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. | |
| power | The power level (0-100) that you want the motor to recieve. |
| void NXT::Motor::SetReverse | ( | Comm::NXTComm * | comm, | |
| int | port, | |||
| int | power | |||
| ) |
Sets a motor to turn backward at a specified power.
| port | The port that you wish to set. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. | |
| power | The power level (0-100) that you want the motor to recieve. |
| void NXT::Motor::Stop | ( | Comm::NXTComm * | comm, | |
| int | port, | |||
| bool | brake | |||
| ) |
Tells a motor to stop turning.
| port | The port that you wish to turn off. Can be the numbers 0-2 or OUT_A, OUT_B, or OUT_C. | |
| brake | Whether or not you want the motor to brake or float. |