Optical sensor from mouse wheel doesn't detect anything

I got an optical sensor from inside of an old computer mouse and am trying to hook it up to an arduino nano. I decided to use a new IRED as the old one didn't work. The IR receiver seems to give no signal (only 0 appears in serial monitor).

My code is below and picture of my setup here (Imgur: The magic of the Internet)

What could I be doing wrong?

void setup() {

 Serial.begin(9600);

#define pulseOutput 17
#define pulseInput 26

}

void loop() {


 {
   pinMode(pulseOutput, INPUT);
   pinMode(pulseInput, OUTPUT);
 }

 int LEDState = analogRead(pulseOutput);

 delay(100);
 Serial.println(LEDState);

}

Did you solder the new LED in backwards?

Paul

#define pulseOutput 17
#define pulseInput 26

Should not be inside void setup()

17 is pin A3 (should be named A3), but what is 26 (wire is connected to D13?).

pinModes should also not be inside loop().

Better start all over by looking at the examples that come with the IDE,
before trying to write or copy/paste code.
Leo..