Class PFMate

    • Constructor Detail

      • PFMate

        public PFMate​(I2CPort port,
                      int channel)
        Constructor takes in the sensor port and the PF channel you will be using
        Parameters:
        port - sensor port
        channel - PF Channel 1-4
      • PFMate

        public PFMate​(I2CPort port,
                      int channel,
                      int address)
        Constructor takes in the sensor port and the PF channel you will be using
        Parameters:
        port - sensor port
        channel - PF Channel 1-4
        address - I2C address of the controller
      • PFMate

        public PFMate​(Port port,
                      int channel)
        Constructor takes in the sensor port and the PF channel you will be using
        Parameters:
        port - sensor port
        channel - PF Channel 1-4
      • PFMate

        public PFMate​(Port port,
                      int channel,
                      int address)
        Constructor takes in the sensor port and the PF channel you will be using
        Parameters:
        port - sensor port
        channel - PF Channel 1-4
        address - I2C address of the controller
    • Method Detail

      • update

        public void update()
        Sends command to PF IR receiver to apply changes made to the registers. Call this after You have set speed, direction and/or channel.
      • setChannel

        public void setChannel​(int channel)
        Sets PF channel to use.
        Parameters:
        channel - 1-4
      • setMotor

        public void setMotor​(int motor)
        Determines which motors are to be used buy default both are activated
        Parameters:
        motor - 0 both, 1 motor A or 2 motor B
      • getChannel

        public int getChannel()
        Returns the current IR channel in use by the PF Mate
        Returns:
        int 1-4
      • getMotor

        public int getMotor()
        Returns which motors are activated
        Returns:
        int 0 both, 1 motor A or 2 motor B