Digital sensors give digital feedback to your robot controller along a type of binary. In the case of digital sensors the binary is on/off, somewhat similar to a light switch.
The main difference between a light switch and a digital sensor is that a digital sensor has a default state. When an action outside of the default state occurs, like a touch sensor being pressed, an event within the Op Mode is triggered and the robot reacts accordingly.
Each Digital Port on the Control Hub (REV-31-1595) or Expansion Hub (REV-31-1153) has two channels for communication. This allows for wiring of two sensors per port when using the sensor splitter cable .
Both the touch sensor and the magnetic limit switch are configured as a “REV Touch Sensor or Magnetic Limit Switch” on the Digital Devices configuration screen. While the magnetic limit switch can be configured on any port, a touch sensor will only work if it is configured on port 1, 3, 5, or 7.
The Touch Sensor is attached to digital port 1, and the Magnetic Limit Switch is attached to digital port 2.
The digital ports son the Control hub look like this: