Problems with Pololu vnh5019 - please help!

Don't use pulseIn() in the initial declaration of the two variables. Do that in setup().