PWM Input on Fez Spider

Hi Guys,

I love how easy it is to set up an input using GT.interface, however, is there an easy way to create a PWM input - I was hoping to read a sonic ranger.


How fast is the frequency?

This pin outputs a pulse width representation of range. To calculate distance use the scale factor of 147uS per inch.

pulse = pulseIn(pwPin, HIGH);
//147uS per inch
inches = pulse/147;

This is what I used on the Arduino. Does that help?

The best way is to use PinCapture.

Perfect - thank you. It looks straight forward enough.