reading pwm

You need the servo library, it does exactly what you want.

Here is a little intro - might be more complicated than you need, the library is very simple and easy to use -

Duane B