Class UnregulatedMotor

    • Field Detail

      • encoderPort

        protected Encoder encoderPort
    • Constructor Detail

      • UnregulatedMotor

        public UnregulatedMotor​(Port port,
                                int PWMMode)
        Create an instance of a NXTMotor using the specified motor port and PWM operating mode.
        Parameters:
        port - The motor port that the motor will be attached to.
        PWMMode - see BasicMotorPort.PWM_FLOAT and see BasicMotorPort.PWM_BRAKE
      • UnregulatedMotor

        public UnregulatedMotor​(Port port)
        Create an instance of a NXTMotor using the specified motor port the PWM operating mode will be PWM_BREAK BasicMotorPort.PWM_BRAKE
        Parameters:
        port - The motor port that the motor will be attached to.
      • UnregulatedMotor

        public UnregulatedMotor​(TachoMotorPort mport,
                                int PWMMode)
        Create an instance of a NXTMotor using the specified motor port and PWM operating mode.
        Parameters:
        mport - The motor port that the motor will be attached to.
        PWMMode - see BasicMotorPort.PWM_FLOAT and see BasicMotorPort.PWM_BRAKE
      • UnregulatedMotor

        public UnregulatedMotor​(TachoMotorPort port)
        Create an instance of a NXTMotor using the specified motor port the PWM operating mode will be PWM_BREAK BasicMotorPort.PWM_BRAKE
        Parameters:
        port - The motor port that the motor will be attached to.
    • Method Detail

      • getTachoCount

        public int getTachoCount()
        Description copied from interface: Encoder
        Returns the tachometer count.
        Specified by:
        getTachoCount in interface Encoder
        Returns:
        tachometer count in degrees
      • resetTachoCount

        public void resetTachoCount()
        Description copied from interface: Encoder
        Reset the tachometer count.
        Specified by:
        resetTachoCount in interface Encoder