GPIO - Read a pulse width

Post your Gambas programming questions here.
Post Reply
User avatar
Askjerry
Posts: 69
Joined: Saturday 18th August 2018 9:06pm
Location: Kyle, Texas, USA
Contact:

GPIO - Read a pulse width

Post by Askjerry »

I have a rotation sensor (TACH) that returns two pulses per revolution.

I can connect this to a GPIO pin... but I don't know how to read a pulse width in.
Can anyone shed some light on this? I want to periodically update my screen... so if I measured it like 20 times a second it would be more than enough.

I am using the piGPIO routines if that's helpful. http://abyz.me.uk/rpi/pigpio/pdif2.html

But I'm open to other options as well. I'm building a wind tunnel and need to know the rotational speed of the turbine to calculate wind speed.

Thanks,
Jerry
Post Reply