Class RCXSensorMultiplexer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, SensorConstants, SensorMode, SensorModes, SampleProvider

    public class RCXSensorMultiplexer
    extends I2CSensor
    Supports Mindsensors RXMux
    This sensor allows you to connect up to four RCX type sensors toa single port. Be aware that the sensor does not track the ticks of the rotation sensor when the port is not selected.
    Author:
    Michael Smith
    • Field Detail

      • DEFAULT_RCXSMUX_ADDRESS

        public static final int DEFAULT_RCXSMUX_ADDRESS
        See Also:
        Constant Field Values
    • Constructor Detail

      • RCXSensorMultiplexer

        public RCXSensorMultiplexer​(I2CPort port)
        Parameters:
        port - NXT Sensor port
      • RCXSensorMultiplexer

        public RCXSensorMultiplexer​(I2CPort port,
                                    int address)
        Parameters:
        port - NXT Sensor port
        address - I2C address
      • RCXSensorMultiplexer

        public RCXSensorMultiplexer​(Port port)
        Parameters:
        port - NXT Sensor port
      • RCXSensorMultiplexer

        public RCXSensorMultiplexer​(Port port,
                                    int address)
        Parameters:
        port - NXT Sensor port
        address - I2C address
    • Method Detail

      • setChannelOne

        public void setChannelOne()
        Selects channel one
      • setChannelTwo

        public void setChannelTwo()
        Selects channel two
      • setChannelThree

        public void setChannelThree()
        Selects channel three
      • setChannelFour

        public void setChannelFour()
        Selects channel four
      • allChannelsOff

        public void allChannelsOff()
        Turns off all channels