Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Measuring Pulse Width (http://www.chiefdelphi.com/forums/showthread.php?t=124634)

fovea1959 14-01-2014 15:50

Measuring Pulse Width
 
Trying to get a MaxBotix sonar going. We're currently measuring the analog output, which works, but has a pile of (low) spikes in the output.

Want to investigate using the pulse width; looking at the Counter class. Trying to figure out something: does getPeriod() give us the time between two successive up-edges, or between an up-edge and a down-edge? how does setSemiPeriodMode affect this? (the docs indicate that specify highSemiPeriod true means to count up on both rising and failing, so does setting highSemiPeriod mean that it only counts on the rising, but indicates the period between the last rise and the last fall?)

Joe Ross 14-01-2014 15:58

Re: Measuring Pulse Width
 
http://wpilib.screenstepslive.com/s/...using-counters seems more clear then the javadocs, although I haven't tried it.

fovea1959 14-01-2014 16:14

Re: Measuring Pulse Width
 
yeah, one of my students just caught that (his mentor should have). Will run experiment tonight and see what happens....

Can always fall back to the 9600 baud TX line :)

BradAMiller 14-01-2014 20:03

Re: Measuring Pulse Width
 
Please post on how well this works for you. I had another report that the analog output line on that sensor was noisy.

Thanks
Brad

fovea1959 15-01-2014 08:24

Re: Measuring Pulse Width
 
will report in when done; hopefully will have something tonight or tomorrow; if not by then, it will be the week of the 27th...


All times are GMT -5. The time now is 22:35.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi