Vex Optical Shaft Encoder with Arduino Uno

Hi,

Does anyone have a code to interface "Vex Optical Shaft Encoder" with "Arduino UNO" to read motor position and speed?

Thank you.