IR emitter / receiver from scrollwheel mouse question

Hey there,
Trying to detect RPM of my motor. Took apart a mouse as per the advice of folks on the forum here, but I'm a little confused. The IR sensor has 3 pins, and all the tutorials are for sensors with 2 pins. Also, it's unclear which leg should be connected to ground on the IR emitter as it is flat and the legs are the same length. There is a FRONT to the emitter, however, so is there a common configuration of right/left positive/negative on those?

Oh, and I'm also seeing people doing both analog and digital reads on the IR sensor, which is correct?

The IR has two in one. The mouse detects which of the two gets blocked first, then decides on which direction it is going.

Ah-ha! Makes sense. So is the middle ground, then?
Should I go ground from the middle, and then a 220ohm from either right or left to the pin? And should it be reading digital or analog? I'm doing analog now and it seems to be working but to test it I'll need to plug in the emitter, and I'm not sure which leg is which... any ideas?

I would assume the middle IS ground, but of all my years dealing with electronics and other situations, I've learned to NEVER assume.
Follow the traces on the circuit board, and see what pin goes to ground. It may or may not be the middle pin, you have to check.

How would I find out if the middle is ground on a component without the aid of a schematic?

Follow the trace on the circuit board back to GND or V-.

Maybe you could use a multimeter to check. If there are 2x diodes and 3x pins then one pin will probably be either a common anode or common cathode and the other 2 pins the opposite.