|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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?) |
|
#2
|
||||||
|
||||||
|
Re: Measuring Pulse Width
http://wpilib.screenstepslive.com/s/...using-counters seems more clear then the javadocs, although I haven't tried it.
|
|
#3
|
||||
|
||||
|
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 ![]() |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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...
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|