View Full Version : Digital IO in C++
EricGoodchild
01-15-2009, 10:53 AM
Hey does anyone know if there is a class for measuring pulse width in the WinLib library?
byteit101
01-15-2009, 03:25 PM
Hey does anyone know if there is a class for measuring pulse width in the WinLib library?
You mean WPILib?
Pulse width of?
BradAMiller
01-15-2009, 05:49 PM
I'm not sure what you're application is, but you can measure pulse widths using the Counter objects in semi-period mode. That is exactly what the ultrasonic sensors do and you can look at the Ultrasonic class source code as an example.
There is one problem though - there is currently a bug in the FPGA that will prevent accurate results, but it will be fixed in the next update.
biojae
01-15-2009, 11:05 PM
Our application is to find the angle of a PWM compass that automatically pulses in. What we were wondering is if there was a way to get the interrupt easily to get the pulse width length.
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.