Class RemoteAnalogPort

    • Constructor Detail

      • RemoteAnalogPort

        public RemoteAnalogPort​(RMIEV3 rmiEV3)
    • Method Detail

      • close

        public void close()
        Description copied from interface: IOPort
        Close the port, the port can not be used after this call.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface IOPort
        Overrides:
        close in class RemoteIOPort
      • getPin6

        public float getPin6()
        Description copied from interface: AnalogPort
        return the voltage present on pin 6 of the sensor port
        Specified by:
        getPin6 in interface AnalogPort
        Returns:
        voltage reading
      • getPin1

        public float getPin1()
        Description copied from interface: AnalogPort
        return the voltage present on pin 1 of the sensor port
        Specified by:
        getPin1 in interface AnalogPort
        Returns:
        voltage reading
      • setPinMode

        public boolean setPinMode​(int mode)
        Description copied from interface: IOPort
        Set the port pins up ready for use.
        Specified by:
        setPinMode in interface IOPort
        Overrides:
        setPinMode in class RemoteIOPort
        Parameters:
        mode - The EV3 pin mode
        Returns:
        true if the operation succeeds false if it fails
      • setType

        public boolean setType​(int type)
        Description copied from interface: BasicSensorPort
        Set the operating type for the attached sensor. Normally type setting is only used with legacy sensors and for i2c devices (to set the speed and operating voltage). It is not normally used with EV3 sensors.
        Specified by:
        setType in interface BasicSensorPort
        Overrides:
        setType in class RemoteIOPort
        Returns:
        true if type accepted
      • getFloats

        public void getFloats​(float[] vals,
                              int offset,
                              int length)
        Description copied from interface: AnalogPort
        Return a series of results obtained from the sensor. This is currently only used for the NXT color sensor
        Specified by:
        getFloats in interface AnalogPort
        Parameters:
        vals - Place to store the values
        offset - Offset into the above array to start storing
        length - number of values to read