|Top Previous Next|
Gets the low pulse width of a capture channel.
The integer number of counts in the most recent low pulse width on the capture channel input, or 0 if there has been no transition on the input since the last time the pulse width was read.
The capture channel must be assigned a pin using the pin property before the pulseLo function can return a valid value.
The value is in counts; use the resolution constant to get the number of counts per second. The actual pulse width (in fractional seconds) can computed as follows:
width = Cell.Capture.pulseLo(channel) / Cell.Capture.resolution;
where channel is the desired capture channel number.
Once the pulse width has been read, subsequent attempts to read the value will return 0 until a transition (low-to-high or high-to-low) occurs on the channel's input pin.
See example for the pulseHi function.