Measure motor rotation

Hello,

I noticed that my rover (Phobot Rover Kit 1.0) is not going straight, I assume I need to adjust each motor dynamically so it can keep a straight line.

The kit comes with 2 rotary encoder disks, right now there are not used.

I’m not an electronic expert so I’m looking for advices here. I was thinking about using 1 IR led + a detector to do the measurement using the holes of the rotary encoder disk.

What do you think? Is there a better way of doing this?

Thank you for your help!

I discovered last night the Photo Interrupter component which seems to be exactly what I need.

Now, I need to figure out a way to connect 2 of those with my current setup. I’m not sure I have enough input left…