guidance with photoelectric sensor + arduino

hi,
i need to read the speed of a shaft and i have this sensor Keyence FS-M1P Fiber Amplifier, Cable Type, Main Unit, PNP - FS-M1P | KEYENCE America
and arduino mega 2560 with lcd keypad shield
i want to know if it is possible to display the data that the sensor gives in terms of RPM or hz in the lcd display

In few words i need to make this http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=370946069820

i did some research and i didn't find something releated with this maybe i am not using the correct words.

any help would be appreciated.

That sensor isn't especially designed to sense rpm, it senses whether the path between a light source and the detector is interrupted or not. I guess you are using it in conjunction with a segmented wheel or something similar.

To interface it to an Arduino, first you need to add a load and reduce the output to a little less than 5V. If you use a 12V power supply, then a simple way of doing this is to connect a 68K resistor between the black wire and the Arduino input pin, and a 47K resistor between the input pin and ground. Connect sensor ground (blue wire) to Arduino ground.

If you use one of the Arduino digital input pins that can generate an interrupt directly, then you can use the code here Frequency Counter Library - #36 by dc42 - Science and Measurement - Arduino Forum to measure the frequency, and hence RPM. Change the attachInterrupt and detachInterrupt calls to use whichever interrupt is associated with the pin you are using.