Hi, I am very close to novice and fully expect this to be a shockingly simple question for you experts!
I am building a home flight simulator with an Arduino Mega and one function is to change the autopilot heading. I have this working with a simple rotary encoder which connects two Arduino pins to ground as it rotates. (The software already figures out which way the encoder is being turned.)

I recently bought an old piece of real aircraft avionics, and the encoder is different. It instead uses an infrared encoder with a serrated wheel passing between a sensor.

I emailed manufacturer and they said this is the datasheet. https://www.ttelectronics.com/TTEle...les/Optoelectronics/Datasheets/OPB822-826.pdf
(Note I intend to disregard all the other PCB inside this unit as I only need the buttons/encoders.)
So now my questions are
1. Will this even work? it seems to contain two photo transistors. When IR light makes it tot the transistor will currently flow from the collector to the emitter and effectively 'ground' the Arduino pins just like the mechanical encoder I am currently using?
2. How do I power the IR LED's without blowing them. I know I need a resistor but I don't know which to use. I see values in the datasheet I know belong in the ohms law formula but am afraid to get this wrong.
Here is my amateur diagram built on what I found in the data sheet showing what I THINK I need to do....

I am building a home flight simulator with an Arduino Mega and one function is to change the autopilot heading. I have this working with a simple rotary encoder which connects two Arduino pins to ground as it rotates. (The software already figures out which way the encoder is being turned.)

I recently bought an old piece of real aircraft avionics, and the encoder is different. It instead uses an infrared encoder with a serrated wheel passing between a sensor.

I emailed manufacturer and they said this is the datasheet. https://www.ttelectronics.com/TTEle...les/Optoelectronics/Datasheets/OPB822-826.pdf
(Note I intend to disregard all the other PCB inside this unit as I only need the buttons/encoders.)
So now my questions are
1. Will this even work? it seems to contain two photo transistors. When IR light makes it tot the transistor will currently flow from the collector to the emitter and effectively 'ground' the Arduino pins just like the mechanical encoder I am currently using?
2. How do I power the IR LED's without blowing them. I know I need a resistor but I don't know which to use. I see values in the datasheet I know belong in the ohms law formula but am afraid to get this wrong.
Here is my amateur diagram built on what I found in the data sheet showing what I THINK I need to do....
