Class LMotor

    • Field Detail

      • LSC_position

        protected int LSC_position
      • SPI_PORT

        protected byte SPI_PORT
      • arrMotorUnload

        public static final int[] arrMotorUnload
      • arrMotorLoad

        public static final int[] arrMotorLoad
    • Constructor Detail

      • LMotor

        public LMotor​(I2CPort port,
                      int location,
                      java.lang.String name,
                      byte SPI_PORT)
        Constructor
        Parameters:
        port - the port
        location - the location
        name - the name of the servo
        SPI_PORT - the SPI port
      • LMotor

        public LMotor​(Port port,
                      int location,
                      java.lang.String name,
                      byte SPI_PORT)
        Constructor
        Parameters:
        port - the port
        location - the location
        name - the name of the servo
        SPI_PORT - the SPI port
    • Method Detail

      • isMoving

        public boolean isMoving()
        Method to know if Servo is moving to a determinated angle
        Returns:
        true iff the servo is moving
      • setDelay

        public void setDelay​(int delay)
        Set a delay in a Motor
        Parameters:
        delay - the delay
      • unload

        public void unload()
      • load

        public void load()
        Load Servo located in a position X
      • getName

        public java.lang.String getName()
        Get name from a RC Servo or a DC Motor
        Specified by:
        getName in interface SensorMode
        Overrides:
        getName in class BaseSensor
        Returns:
        The description/name of this mode
      • setPulse

        protected void setPulse​(int pulse)
        This class set the Pulse over a RC Servo or a DC Motor
        Parameters:
        pulse -
      • getPulse

        protected int getPulse()
        This method return current pulse over a RC Servo or a DC Motor. This method is used internally by LDCMotor Objects or LServo Objects to get the speed or angle.
        Returns:
        the pulse