X-band motion detector, pulse count

That code dosn't match the formular in reply #10, did you mean it to?