Prototyping Photointerrupter Schematic

Hello! I'm still quite new here. I'm trying to make a prototype of my schematic that involves a photointerrupter (QVA11134). This is the schematic basically(R2 is 1k ohm), I just duplicate it because my project needs two of it. This is code :

int sensorValue = 0;
int Read0;
int Read1;

void setup() {
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);

  Serial.begin(9600);
}

void loop() {
Read0=analogRead(A0);
Read1=analogRead(A1);
Serial.print (" ");
Serial.println(Read0);
Serial.print(Read1);

delay(100);

}

My problem is,when I ran the serial monitor, everything reads 0,but when I pressed the back of my perfboard(which is connecting pin 4s and the one that goes to A0/A1 in Arduino), it reads a number depending on how hard I pressed it with my human hand only, for example if I press lightly it reads 10,if I press hard it reads 50,etc. But it wouldn't work if I press it with anything else other than my bare hand. I also tried to remove the photointerrupter and it still happens,so I assume the photointerrupter is not connected at all to the circuit.
So, can I connect the photointerrupter with jumper wires like this?
If not then,how can I connect it? Also it would help tremendously if you can help me identify the problem!

I'm using Arduino Uno.

So your code works, and your finger works.. only thing left is your sensor is not working or not wired correctly.

Yes you can hook a sensor up to a wire like that, what your doing with those wires afterwards is likely the issue but we can’t see your circuit.

You might consider that particular sensor is a “switch” according to data sheet so a digital read might be more apt vs analog.

What do you want to use the photo detector for?

If you just want an ON/OFF indication then you can treat it as a digital input with that circuit and just use digitalRead(A0)

I suspect R2 at 1k is too large. My guess is an LED current of about 10mA or 20mA would be appropriate. But be sure to check the specs for the LED in your device.

...R

My crystal ball shows a missing Gnd connection.

Are you sure that the bridge LED and transistor connections are not polarity reversed?