QTI Sensor byte only reporting 1s, not 0s

I currently have installed two QTI sensors on the front of my Parallax Arduino Uno/BOE Robot Shield. One of the QTI sensors is working normally and when I print the byte associated through the serial monitor I get 0s when hovering over something dark and 1s when hovering over something light or when not hovering over something.

However my other sensor is only reporting 1s, not matter what it is over.

Here is my code:

#include <Servo.h>
Servo servoLeft;
Servo servoRight;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("Testing QTI Sensor");
}

void loop() {
  pinMode(2, OUTPUT);
  digitalWrite(2, HIGH);
  delay(1);

  pinMode(1, OUTPUT);
  digitalWrite(1, HIGH);
  delay(1);
  
  // Wait 1 ms and let capacitor discharge
  pinMode(2,INPUT);
  delay(1);

  pinMode(1, INPUT);
  delay(1);
  
  // read pin 2
  byte sensor1 = digitalRead(2);
  Serial.println("Sensor 1");
  Serial.print(sensor1);
  delay(2000);

  byte sensor2 = digitalRead(1);
  Serial.println("Sensor 2");
  Serial.print(sensor2);
  delay(2000);