Virtual Robot Simulator Official Guidebook
  • Coverpage
  • Introduction
  • FTC
    • Centerstage Game and Basic Rules
    • Powerplay Game and Basic Rules
  • VRS
  • Programming
    • User Interface
    • Blocks
      • LinearOpMode
      • Gamepad
      • Actuators
        • DcMotor
        • CRServo
        • Servo
      • Sensors
        • DistanceSensor
        • IMU
        • IMU-BNO055.Parameters
        • REV Color/Range Sensor
        • TouchSensor
      • Utilities
        • Acceleration
        • AngleUnit
        • AngularVelocity
        • Axis
        • Color
        • Orientation
        • PIDFCoefficients
        • Position
        • Range
        • Telemetry
        • Time
        • Vector
        • Velocity
      • Logic
      • Loops
      • Math
      • Text
      • Lists
      • Variables
      • Function
      • Miscellaneous
    • Basic Lessons
      • Drivetrain
      • IMU
      • Color Sensor
      • Telemetry
      • Range Sensor
      • Touch Sensor
      • Servo
      • CRServo
      • DCMotor
      • Logic and Loops
      • Functions
      • Tele-Op Control
    • Advanced Lessons
      • Advanced Tele-Op Control
    • Video Lessons
    • Simulation
    • Exploratory Activities
      • Wandering Robot
  • Robot Arena
    • Single Player
    • Activities
      • Coding Competition
      • CenterStage Competition
  • Conclusion
  • Author
  • Other Editions
Powered by GitBook
On this page
  1. Programming
  2. Blocks
  3. Sensors

TouchSensor

PreviousREV Color/Range SensorNextUtilities

Last updated 9 months ago

This sensor is connected as a digital device and not connected via an I2C bus so it does not have an I2C address.

isPressed

Return true if the named touch sensor has been pressed, false otherwise.

Key points:

  • Purpose: To determine whether the sensor is pressed or not.

  • Return value: True if the sensor is pressed.

  • Usage: Typically used within a loop to check whether the robot hits an object or not.