com.qualcomm.robotcore.hardware

## Interface TouchSensor

- All Superinterfaces:
    HardwareDevice

      public interface TouchSensor
      extends HardwareDevice

  `TouchSensor` models a button.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getValue()` Represents how much force is applied to the touch sensor; for some touch sensors this value will only ever be 0 or 1.
    `boolean` | `isPressed()` Return true if the touch sensor is being pressed

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### getValue

          double getValue()

      Represents how much force is applied to the touch sensor; for some touch sensors this value will only ever be 0 or 1.
      Returns:
        a number between 0 and 1

    - #### isPressed

          boolean isPressed()

      Return true if the touch sensor is being pressed
      Returns:
        true if the touch sensor is being pressed