Class NXTTouchSensor

    • Constructor Detail

      • NXTTouchSensor

        public NXTTouchSensor​(AnalogPort port)
        Create a touch sensor object attached to the specified open port. Note this port will not be configured. Any configuration od the sensor port must take place externally.
        Parameters:
        port - an open Analog port
      • NXTTouchSensor

        public NXTTouchSensor​(Port port)
        Create an NXT touch sensor object attached to the specified port.
        Parameters:
        port - the port that has the sensor attached
    • Method Detail

      • init

        protected void init()
      • getTouchMode

        public SensorMode getTouchMode()
        get a sample provider that returns an indication of the button being up(0) or down(1)
        Returns:
        the sample provider